Add missing word 'place' and reflow the text to fit
[the-server-room.git] / the-server-room.inf
1 !% -SD
2 !=========================================================================
3 ! Copyright (C) 2019, 2020, 2021 Jason Self <j@jxself.org>
4 !
5 ! This program is free software: you can redistribute it and/or modify
6 ! it under the terms of the GNU Affero General Public License as
7 ! published by the Free Software Foundation, either version 3 of the
8 ! License, or (at your option) any later version.
9 !
10 ! This program is distributed in the hope that it will be useful,
11 ! but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ! GNU Affero General Public License for more details.
14 !
15 ! You should have received a copy of the GNU Affero General Public
16 ! License along with this program. If not, see
17 ! <https://www.gnu.org/licenses/>.
18 !
19 !This file incorporates work covered by the following copyright and
20 !permission notice:
21 !
22 ! Copyright (C) 2008 Daniel Bartholomew
23 !
24 ! This program is free software: you can redistribute it and/or modify
25 ! it under the terms of the GNU General Public License as published by
26 ! the Free Software Foundation, either version 3 of the License, or
27 ! (at your option) any later version.
28 !
29 ! This program is distributed in the hope that it will be useful,
30 ! but WITHOUT ANY WARRANTY; without even the implied warranty of
31 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 ! GNU General Public License for more details.
33 !
34 ! You should have received a copy of the GNU General Public License
35 ! along with this program. If not, see
36 ! <https://www.gnu.org/licenses/>.
37 !=========================================================================
38 Constant Story "The Server Room";
39 Constant Headline "^An Interactive Fiction by Daniel Bartholomew 
40 with modifications by Jason Self.^";
41 Release 1;
42 Serial "210202";
43 Constant MAX_SCORE = 6;
44 Include "parser";
45 Include "verblib";
46 Global beeping = 1;
47 !=========================================================================
48 ! The Game Objects
49
50 Object  break_room "Break Room"
51   with  description
52             "This break room is a calm, quiet and peaceful place for 
53             people to unwind and eat. Well kept and organized, the 
54             area is clean and inviting. A large television is mounted 
55             to one of the walls, next to a refrigerator. Even though 
56             no one's around the smell of a pleasant coffee blend still
57             hangs in the air. A cool-looking counter and white couch
58             take up another wall. The remaining walls have posters of
59             various sports teams of the previous four years. East is
60             the outside world and west is the hallway to the server
61             room.",
62         w_to hallway,
63         e_to
64             "You take one look outside and think better of it. The
65             daystar is too bright and terrible to face today. Besides,
66             you have work to do.",
67   has   light;
68
69 Object  tv "television" break_room
70   with  description
71             "It looks like a cheap, generic flat screen television
72             with an edge-to-edge matte screen. You see no buttons on
73             it. There should be a remote control somewhere.",
74         name 'tv' 'television' 'telly',
75         before [;
76           SwitchOn:
77             print_ret
78                 "The television can only be turned on using the
79                 remote.";
80         ],
81   has   container openable scenery switchable;
82
83 Object  whitecouch "white couch" break_room
84   with  description
85             "With a smooth and modern design, this looks to be a luxurious couch.
86             It is extremely durable and easy to clean and maintain. Offering
87             enough room to sit or lay, it looks very soft and comfortable.",
88         name 'white' 'couch' 'sofa',
89         before [;
90           Take, Pull, Push, PushDir:
91             print_ret (The) self, " is too heavy for that.";
92         ],
93   has   scenery static supporter enterable;
94
95 Object  posters "posters" break_room
96   with  description
97             "Fold outs from a japanese sport fanzine, the posters
98             really show off the players and game.",
99         name 'sport' 'sports' 'poster' 'posters',
100   has   scenery;
101
102 Object  fridge "refrigerator" break_room
103   with  description
104             "This refrigerator makes a statement with a sleek, modern
105             and minimal stainless steel design. Featuring large doors
106             it seems quite an impressive refrigerator that can hold a
107             lot.",
108         name 'fridge' 'refrigerator',
109   has   container openable scenery;
110
111 Object  counter "long counter" break_room
112   with  description
113             "It's a beautiful, stylish, and high-quality solid wood
114             counter that runs the length of the wall. You can't quite
115             determine the color of the sleek countertop, it's
116             somewhere between green and brown. The design on the
117             countertop consists of geometric patterns. It seems a
118             sturdy, durable, and solid counter.",
119         name 'counter',
120   has   static supporter scenery;
121
122 Object  microwave "microwave" counter
123   with  description
124             "A combination of silver and black, this microwave looks
125             like a real workhorse. It's compact, quiet, and works
126             great.",
127         name 'microwave' 'micro',
128         before [;
129           Receive:
130             print "Put ";
131             print (a) noun;
132             print_ret
133                 " into the microwave? Maybe you should come with a
134                 warning label because you contain more than a trace
135                 amount of nut.";
136         ],
137   has   container openable;
138
139 Object  table "table" break_room
140   with  description "The table is made of strong wood. It looks to 
141                     be about 6 feet across and could probably sit 6 
142                     to 8 people. It's white, round and seems very 
143                     functional as a table despite looking quite 
144                     heavy.",
145         name 'table',
146         before [;
147           Take:
148             "Let me spell it out for you: it is a T A B L E and you
149             are NOT Superman.";
150         ],
151   has   scenery supporter;
152
153 Object  backpack "backpack" table
154   with  description
155             "This backpack looks like a modern art piece that was
156             made using brown and light blue-green watercolors. A black
157             line was traced around to make the stitching lines.
158             Well-worn and quite suitable for travel, it looks like it
159             could carry a lot of belongings.",
160         name 'pack' 'back' 'bag' 'backpack',
161         article "your",
162         before [;
163           Open:
164             if (backpack hasnt visited) {
165                 score = score + 2;
166                 give backpack visited;
167             }
168         ],
169   has   clothing container openable;
170
171 Object  disc "Trisquel CD" backpack
172   with  description
173             "An automatic recovery CD, guaranteed to fix almost any
174             server.^^Ok, it's just an install CD that auto-installs
175             Trisquel, but hey, if it works, it works.",
176         name 'disk' 'disc' 'Trisquel' 'cd',
177         after [;
178           Take:
179             if (disc hasnt visited) {
180                 score = score + 2;
181                 give disc visited;
182             }
183         ],
184   has   ;
185
186 Object  hallway "Hallway"
187   with  description
188             "The hallway is long and rectangular, and the walls are 
189             painted a cool blue and the floor is carpeted. One of the 
190             long walls is decorated with a few paintings, all of 
191             different scenes from around the city. The wall opposite 
192             the paintings has a glass display case. Doors lead east 
193             back to the break room, north to the server room, or west 
194             to the restrooms.",
195         e_to break_room,
196         n_to
197             "You use your key card to open the server room door but
198             instead of a beep of approval and an unlocked door you
199             get a buzz of denial and the door remains locked. Plus:
200             Through the window in the door you can see someone moving
201             around inside but there shouldn't be anyone else here
202             today.",
203         w_to restroom,
204   has   light;
205
206 Object  carpet "carpet" hallway
207   with  description
208             "The carpet is a deep red color and very well kept. It 
209             covers the floor of the entire hallway. It has an 
210             intricate pattern of woven vines, flowers and leaves.",
211         name 'carpet' 'floor',
212   has   scenery;
213
214 Object  paintings "paintings" hallway
215   with  description
216             "There's a painting of the city bridge with a young girl 
217             standing on it and looking out to the horizon, another of 
218             a large three-masted ship tied up at the docks with 
219             several people on the deck looking out over the water, 
220             one of an old style saloon with a bucking horse outside.",
221         name 'paint' 'painting' 'paintings',
222         before [;
223           Take, Pull, Push, PushDir:
224             print_ret (The) self, " are firmly attached to the wall.";
225         ],
226   has   scenery pluralname;
227
228 Object  case "glass display case" hallway
229   with  description
230             "The display case is large and made of glass.",
231         name 'glass' 'display' 'case',
232         before [;
233           Take, Pull, Push, PushDir:
234             print_ret (The) self, " is too heavy for that.";
235         ],
236   has   container openable scenery transparent;
237
238 Object  award "crystal award" case
239   with  description
240             "It's an award the company won. It's made of extremely 
241             ornate crystal, in fact more so than any other crystal 
242             award you've ever seen; this is probably because it's the 
243             only one you've ever seen up close. The bottom is a solid 
244             crystal octagon and there are actually eight more little 
245             crystals that act as legs supporting the main crystal 
246             octagon.",
247         name 'crystal' 'award';
248
249 Object  keycard "key card" break_room
250   with  description
251             "The key card is thin and black with a magnetic strip 
252             down the middle. The card is slightly bendable and easy 
253             to grip.",
254         name 'key' 'card' 'keycard',
255   has   ;
256
257 Object  restroom "Restroom"
258   with  description
259             "This average-sized, square restroom has a sink set into a
260             resin counter. The floor is tiled, the ceiling has
261             removable tiles, and the walls are painted with a
262             wallpapered dado. Light is provided by ceiling lights. The
263             room is done in colors that remind you of the sky and
264             overall looks very eclectic.",
265         e_to hallway,
266   has   light;
267
268 Object  server_room "Server Room"
269   with  description
270             "The fans, the lights, the chill . . . yep, it's a server
271             room. Full of servers from a dozen different
272             manufacturers, each with their own quirks.^^Your
273             attention is immediately drawn to a server 2/3 of the way
274             up rack 7. The little indicator light is blinking red, and
275             it is beeping.",
276         s_to hallway,
277         each_turn [;
278             beeping = random(7);
279             switch (beeping) {
280               1:
281                 "^The beeping is driving you crazy.";
282               2:
283                 "^It's hard to think, with all of the beeping.";
284               3:
285                 "^The monotony of the beeping is maddening.";
286               4:
287                 "^You can't stand the beeping.";
288               5:
289                 "^The beeping reminds you of your alarm clock.";
290               6:
291                 "^beep . . . beep . . . beep . . . beep . . . beep
292                 . . . beep . . .";
293               7:
294                 "^If you don't stop the beeping soon, you'll loose
295                 what little hair you have left.";
296             }
297         ],
298   has   light;
299
300 Object  server "server" server_room
301   with  description
302             "The indicator light on this ancient server is blinking
303             orange. The rest the front is featureless except for the
304             CD tray. The beeping seems to emanate from somewhere
305             inside the server.",
306         name 'server' 'machine' 'computer' 'ancient' 'old',
307   has   scenery;
308
309 Object  tray "tray" server_room
310   with  description "It's a CD tray. Just like every other CD tray.",
311         name 'cd' 'tray',
312         before [;
313           Receive:
314             if (noun ~= disc)
315                 print_ret (The) noun, " is too big to fit.";
316           Open:
317             if (tray hasnt visited) {
318                 score = score + 2;
319                 give tray visited;
320             }
321         ],
322         after [;
323           Open:
324             print_ret "You press the button and the CD tray pops out.";
325           Close:
326             if (disc in self) {
327                 deadflag = 5;
328                 print_ret
329                     "^With the CD in the tray, you quickly reboot the
330                     server.^^After the bios posts, your disc starts
331                     doing its thing and before you know it the server
332                     is happily running Trisquel, and even more than
333                     that, the beeping has stopped. Yay!";
334             }
335         ],
336   has   container openable scenery;
337
338 !=========================================================================
339 ! Entry point routines
340
341 [ Initialise;
342     location = break_room;
343     move keycard to player;
344     "^^^^It's Saturday, a nice one at that, and you've been called in
345     to fix a server that's on the blink. Again.^^You've had it. This
346     server is going to run GNU/Linux from this day forward! The
347     process will be easy - just put the disc into the server and away
348     we go. Now where is that Trisquel CD?^";
349 ];
350
351 [ Deathmessage;
352     if (deadflag == 5)
353         print "You have won";
354 ];
355
356 !=========================================================================
357 ! Standard and Extended Grammar
358 Include "grammar";
359 !=========================================================================