Implemente the television
[the-server-room.git] / the-server-room.inf
index 0fad0f1425f783acdf24957240bc29cd0fc1a884..a93486ff401edf47f6a224838861018d70e7093b 100644 (file)
 ! <https://www.gnu.org/licenses/>.
 !=========================================================================
 Constant Story "The Server Room";
-Constant Headline
-    "^An Interactive Fiction by Daniel Bartholomew.^";
-Release 1; Serial "080625"; !for keeping track of public releases
-
+Constant Headline "^An Interactive Fiction by Daniel Bartholomew.^";
+Release 1;
+Serial "190908";
 Constant MAX_SCORE = 6;
-
 Include "parser";
 Include "verblib";
-
-global openedbackpack = 1;
-global openedtray = 1;
-global takencd = 1;
-global beeping = 1;
-
+Global beeping = 1;
 !=========================================================================
 ! The Game Objects
 
-Object break_room "Break Room"
-    with
-        description "Your standard break room. A fridge, and a long
-            counter take up one wall. East is the outside world and west
-            is the hallway to the server room.",
+Object  break_room "Break Room"
+  with  description
+            "This break room is a calm, quiet and peaceful for people
+            to unwind and eat. Well kept and organized, the area is
+            clean and inviting. A large television is mounted to one
+            of the walls, next to a refrigerator. Even though no
+            one's around the smell of a pleasant coffee blend still
+            hangs in the air. A cool-looking counter and white couch
+            take up another wall. The remaining walls have posters of
+            various sports teams of the previous four years. East is
+            the outside world and west is the hallway to the server
+            room.",
         w_to hallway,
-        e_to "You take one look outside and think better of it. The
-            daystar is too bright and terrible to face today. Besides, you
-            have work to do.",
-    has light;
-
-Object fridge "refrigerator" break_room
-    with
-        description "Your standard refrigerator.",
+        e_to
+            "You take one look outside and think better of it. The
+            daystar is too bright and terrible to face today. Besides,
+            you have work to do.",
+  has   light;
+
+Object  tv "television" break_room
+  with  description
+            "It looks like a cheap, generic flat screen television
+            with an edge-to-edge matte screen. You see no buttons on
+            it. There should be a remote control somewhere.",
+        name 'tv' 'television' 'telly',
+  has   container openable scenery;
+
+Object  fridge "refrigerator" break_room
+  with  description
+            "This refrigerator makes a statement with a sleek, modern
+            and minimal stainless steel design. Featuring large doors
+            it seems quite an impressive refrigerator that can hold a
+            lot.",
         name 'fridge' 'refrigerator',
-    has container openable scenery;
+  has   container openable scenery;
 
-Object counter "long counter" break_room
-    with
-        description "A long counter. You can't quite determine the color,
-            it's somewhere between green and brown. On the counter is a
-            microwave.",
+Object  counter "long counter" break_room
+  with  description
+            "It's a beautiful, stylish, and high-quality solid wood
+            counter that runs the length of the wall. You can't quite
+            determine the color of the sleek countertop, it's
+            somewhere between green and brown. The design on the
+            countertop consists of geometric patterns. It seems a
+            sturdy, durable, and solid counter.",
         name 'counter',
-    has static supporter scenery;
+  has   static supporter scenery;
 
-Object microwave "microwave" counter
-    with
-        description "Your standard microwave.",
+Object  microwave "microwave" counter
+  with  description
+            "A combination of silver and black, this microwave looks
+            like a real workhorse. It's compact, quiet, and works
+            great.",
         name 'microwave' 'micro',
-    has container openable scenery;
+  has   container openable;
 
-Object table "Table" break_room
-    with
-        description "It's a table. Were you expecting something else?",
+Object  table "table" break_room
+  with  description "It's a table. Were you expecting something else?",
         name 'table',
-    before [;
-        Take: "Let me spell it out for you: it is a T A B L E and you are
-                NOT Superman.";
-    ],
-    has supporter;
-
-Object backpack "backpack" table
-    with
-        description "Your backpack.",
-        name 'pack' 'back' 'bag' 'backpack', article "your",
-    before [;
-        Open:
-            if (openedbackpack == 1) {
+        before [;
+          Take:
+            "Let me spell it out for you: it is a T A B L E and you
+            are NOT Superman.";
+        ],
+  has   supporter;
+
+Object  backpack "backpack" table
+  with  description
+            "This backpack looks like a modern art piece that was
+            made using brown and light blue-green watercolors. A black
+            line was traced around to make the stitching lines.
+            Well-worn and quite suitable for travel, it looks like it
+            could carry a lot of belongings.",
+        name 'pack' 'back' 'bag' 'backpack',
+        article "your",
+        before [;
+          Open:
+            if (backpack hasnt visited) {
                 score = score + 2;
-                openedbackpack = 2;
+                give backpack visited;
             }
-    ],
-    has clothing container openable;
-
-Object disc "Ubuntu CD" backpack
-    with
-        description "An automatic recovery CD, guaranteed to fix almost
-            any server.^^Ok, it's just an install CD that auto-installs
-            Ubuntu, but hey, if it works, it works.",
-        name 'disk' 'disc' 'Ubuntu' 'cd',
-    after [;
-        Take:
-            if (takencd == 1) {
+        ],
+  has   clothing container openable;
+
+Object  disc "Trisquel CD" backpack
+  with  description
+            "An automatic recovery CD, guaranteed to fix almost any
+            server.^^Ok, it's just an install CD that auto-installs
+            Trisquel, but hey, if it works, it works.",
+        name 'disk' 'disc' 'Trisquel' 'cd',
+        after [;
+          Take:
+            if (disc hasnt visited) {
                 score = score + 2;
-                takencd = 2;
-                print_ret "You pick up the Ubuntu CD.^";
+                give disc visited;
             }
-    ],
-    has ;
-
-Object hallway "Hallway"
-    with
-        description "Bereft of features, adornment or even adequate
-            lighting, this hallway is as plain as they come. Doors lead
-            east back to the break room, north to the server room, or west
-            to the restrooms.",
-        e_to break_room,
-        n_to server_room,
-        w_to "When nature calls, you'll know about it, but right now, it
-                isn't calling.",
-        before [;
-            Go:
-                if (noun == n_obj) {
-                    StartDaemon(server_room);
-                    print "^^You use your key card to open the server room
-                        door and step into your world.^";
-                }
         ],
-    has    light;
-
-Object server_room "Server Room"
-    with
-        description "The fans, the lights, the chill . . . yep, it's a
-            server room. Full of servers from a dozen different
-            manufacturers, each with their own quirks.^^Your attention is
-            immediately drawn to a server 2/3 of the way up rack 7. The
-            little indicator light is blinking red, and it is beeping.",
+  has   ;
+
+Object  hallway "Hallway"
+  with  description
+            "Bereft of features, adornment or even adequate lighting,
+            this hallway is as plain as they come. Doors lead east
+            back to the break room, north to the server room, or
+            west to the restrooms.",
+        e_to break_room,
+        n_to
+            "You use your key card to open the server room door but
+            instead of a beep of approval and an unlocked door you
+            get a buzz of denial and the door remains locked. Plus:
+            Through the window in the door you can see someone moving
+            around inside but there shouldn't be anyone else here
+            today.",
+        w_to restroom,
+  has   light;
+
+Object  restroom "Restroom"
+  with  description
+            "This average-sized, square restroom has a sink set into a
+            resin counter. The floor is tiled, the ceiling has
+            removable tiles, and the walls are painted with a
+            wallpapered dado. Light is provided by ceiling lights. The
+            room is done in colors that remind you of the sky and
+            overall looks very eclectic.",
+        e_to hallway,
+  has   light;
+
+Object  server_room "Server Room"
+  with  description
+            "The fans, the lights, the chill . . . yep, it's a server
+            room. Full of servers from a dozen different
+            manufacturers, each with their own quirks.^^Your
+            attention is immediately drawn to a server 2/3 of the way
+            up rack 7. The little indicator light is blinking red, and
+            it is beeping.",
         s_to hallway,
-        daemon [;
-            if (location ~= server_room) return;
+        each_turn [;
             beeping = random(7);
             switch (beeping) {
-                1: "^The beeping is driving you crazy.";
-                2: "^It's hard to think, with all of the beeping.";
-                3: "^The monotony of the beeping is maddening.";
-                4: "^You can't stand the beeping.";
-                5: "^The beeping reminds you of your alarm clock.";
-                6: "^beep . . . beep . . . beep . . . beep . . . beep
-                     . . . beep . . .";
-                7: "^If you don't stop the beeping soon, you'll loose what
-                    little hair you have left.";
+              1:
+                "^The beeping is driving you crazy.";
+              2:
+                "^It's hard to think, with all of the beeping.";
+              3:
+                "^The monotony of the beeping is maddening.";
+              4:
+                "^You can't stand the beeping.";
+              5:
+                "^The beeping reminds you of your alarm clock.";
+              6:
+                "^beep . . . beep . . . beep . . . beep . . . beep
+                . . . beep . . .";
+              7:
+                "^If you don't stop the beeping soon, you'll loose
+                what little hair you have left.";
             }
         ],
-    has    light;
+  has   light;
 
-Object server "server" server_room
-    with
-        description "The indicator light on this ancient server is
-            blinking orange. The rest the front is featureless except for
-            the CD tray. The beeping seems to emanate from somewhere
+Object  server "server" server_room
+  with  description
+            "The indicator light on this ancient server is blinking
+            orange. The rest the front is featureless except for the
+            CD tray. The beeping seems to emanate from somewhere
             inside the server.",
         name 'server' 'machine' 'computer' 'ancient' 'old',
-    has scenery;
+  has   scenery;
 
-Object tray "tray" server_room
-    with
-        description "It's a CD tray. Just like every other CD tray.",
+Object  tray "tray" server_room
+  with  description "It's a CD tray. Just like every other CD tray.",
         name 'cd' 'tray',
-    before [;
-        Open:
-            if (openedtray == 1) {
+        before [;
+          Receive:
+            if (noun ~= disc)
+                print_ret (The) noun, " is too big to fit.";
+          Open:
+            if (tray hasnt visited) {
                 score = score + 2;
-                openedtray = 2;
+                give tray visited;
             }
-    ],
-    after [;
-        Open:
+        ],
+        after [;
+          Open:
             print_ret "You press the button and the CD tray pops out.";
-        Close:
+          Close:
             if (disc in self) {
                 deadflag = 5;
-                print_ret "^With the CD in the tray, you quickly reboot
-                    the server.^^After the bios posts, your disc starts
-                    doing its thing and before you know it the server is
-                    happily running Ubuntu, and even more than that, the
-                    beeping has stopped. Yay!";
+                print_ret
+                    "^With the CD in the tray, you quickly reboot the
+                    server.^^After the bios posts, your disc starts
+                    doing its thing and before you know it the server
+                    is happily running Trisquel, and even more than
+                    that, the beeping has stopped. Yay!";
             }
-    ],
-    has container openable scenery;
+        ],
+  has   container openable scenery;
 
 !=========================================================================
 ! Entry point routines
 
 [ Initialise;
     location = break_room;
-    "^^^^It's Saturday, a nice one at that, and you've been called in to
-        fix a server that's on the blink. Again.^^You've had it. This
-        server is going to run Linux from this day forward! The process
-        will be easy - just put the disc into the server and away we go.
-        Now where is that Ubuntu CD?^";
+    "^^^^It's Saturday, a nice one at that, and you've been called in
+    to fix a server that's on the blink. Again.^^You've had it. This
+    server is going to run GNU/Linux from this day forward! The
+    process will be easy - just put the disc into the server and away
+    we go. Now where is that Trisquel CD?^";
 ];
 
 [ Deathmessage;
-    if (deadflag == 5) print "You have won";
+    if (deadflag == 5)
+        print "You have won";
 ];
 
 !=========================================================================
 ! Standard and Extended Grammar
-
 Include "grammar";
-
-!=========================================================================
+!=========================================================================
\ No newline at end of file