Improve description of the long counter
[the-server-room.git] / the-server-room.inf
1 !% -SD
2 !=========================================================================
3 ! Copyright (C) 2019 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 Release 1;
41 Serial "190908";
42 Constant MAX_SCORE = 6;
43 Include "parser";
44 Include "verblib";
45 Global openedbackpack = 1;
46 Global openedtray = 1;
47 Global takencd = 1;
48 Global beeping = 1;
49 !=========================================================================
50 ! The Game Objects
51
52 Object  break_room "Break Room"
53   with  description
54             "This break room is a calm, quiet and peaceful for people
55             to unwind and eat. Well kept and organized, the area is
56             clean and inviting. A large television is mounted to one
57             of the walls, next to a refrigerator. Even though no
58             one's around the smell of a pleasant coffee blend still
59             hangs in the air. A cool-looking counter and white couch
60             take up another wall. The remaining walls have posters of
61             various sports teams of the previous four years. East is
62             the outside world and west is the hallway to the server
63             room.",
64         w_to hallway,
65         e_to
66             "You take one look outside and think better of it. The
67             daystar is too bright and terrible to face today. Besides,
68             you have work to do.",
69   has   light;
70
71 Object  fridge "refrigerator" break_room
72   with  description
73             "This refrigerator makes a statement with a sleek, modern
74             and minimal stainless steel design. Featuring large doors
75             it seems quite an impressive refrigerator that can hold a
76             lot.",
77         name 'fridge' 'refrigerator',
78   has   container openable scenery;
79
80 Object  counter "long counter" break_room
81   with  description
82             "It's a beautiful, stylish, and high-quality solid wood
83             counter that runs the length of the wall. You can't quite
84             determine the color of the sleek countertop, it's
85             somewhere between green and brown. The design on the
86             countertop consists of geometric patterns. It seems a
87             sturdy, durable, and solid counter.",
88         name 'counter',
89   has   static supporter scenery;
90
91 Object  microwave "microwave" counter
92   with  description
93             "A combination of silver and black, this microwave looks
94             like a real workhorse. It's compact, quiet, and works
95             great.",
96         name 'microwave' 'micro',
97   has   container openable;
98
99 Object  table "table" break_room
100   with  description "It's a table. Were you expecting something else?",
101         name 'table',
102         before [;
103           Take:
104             "Let me spell it out for you: it is a T A B L E and you
105             are NOT Superman.";
106         ],
107   has   supporter;
108
109 Object  backpack "backpack" table
110   with  description
111             "This backpack looks like a modern art piece that was
112             made using brown and light blue-green watercolors. A black
113             line was traced around to make the stitching lines.
114             Well-worn and quite suitable for travel, it looks like it
115             could carry a lot of belongings.",
116         name 'pack' 'back' 'bag' 'backpack',
117         article "your",
118         before [;
119           Open:
120             if (openedbackpack == 1) {
121                 score = score + 2;
122                 openedbackpack = 2;
123             }
124         ],
125   has   clothing container openable;
126
127 Object  disc "Trisquel CD" backpack
128   with  description
129             "An automatic recovery CD, guaranteed to fix almost any
130             server.^^Ok, it's just an install CD that auto-installs
131             Trisquel, but hey, if it works, it works.",
132         name 'disk' 'disc' 'Trisquel' 'cd',
133         after [;
134           Take:
135             if (takencd == 1) {
136                 score = score + 2;
137                 takencd = 2;
138                 print_ret "You pick up the Trisquel CD.^";
139             }
140         ],
141   has   ;
142
143 Object  hallway "Hallway"
144   with  description
145             "Bereft of features, adornment or even adequate lighting,
146             this hallway is as plain as they come. Doors lead east
147             back to the break room, north to the server room, or
148             west to the restrooms.",
149         e_to break_room,
150         n_to
151             "You use your key card to open the server room door but
152             instead of a beep of approval and an unlocked door you
153             get a buzz of denial and the door remains locked. Plus:
154             Through the window in the door you can see someone moving
155             around inside but there shouldn't be anyone else here
156             today.",
157         w_to restroom,
158   has   light;
159
160 Object  restroom "Restroom"
161   with  description
162             "This average-sized, square restroom has a sink set into a
163             resin counter. The floor is tiled, the ceiling has
164             removable tiles, and the walls are painted with a
165             wallpapered dado. Light is provided by ceiling lights. The
166             room is done in colors that remind you of the sky and
167             overall looks very eclectic.",
168         e_to hallway,
169   has   light;
170
171 Object  server_room "Server Room"
172   with  description
173             "The fans, the lights, the chill . . . yep, it's a server
174             room. Full of servers from a dozen different
175             manufacturers, each with their own quirks.^^Your
176             attention is immediately drawn to a server 2/3 of the way
177             up rack 7. The little indicator light is blinking red, and
178             it is beeping.",
179         s_to hallway,
180         each_turn [;
181             beeping = random(7);
182             switch (beeping) {
183               1:
184                 "^The beeping is driving you crazy.";
185               2:
186                 "^It's hard to think, with all of the beeping.";
187               3:
188                 "^The monotony of the beeping is maddening.";
189               4:
190                 "^You can't stand the beeping.";
191               5:
192                 "^The beeping reminds you of your alarm clock.";
193               6:
194                 "^beep . . . beep . . . beep . . . beep . . . beep
195                 . . . beep . . .";
196               7:
197                 "^If you don't stop the beeping soon, you'll loose
198                 what little hair you have left.";
199             }
200         ],
201   has   light;
202
203 Object  server "server" server_room
204   with  description
205             "The indicator light on this ancient server is blinking
206             orange. The rest the front is featureless except for the
207             CD tray. The beeping seems to emanate from somewhere
208             inside the server.",
209         name 'server' 'machine' 'computer' 'ancient' 'old',
210   has   scenery;
211
212 Object  tray "tray" server_room
213   with  description "It's a CD tray. Just like every other CD tray.",
214         name 'cd' 'tray',
215         before [;
216           Receive:
217             if (noun ~= disc)
218                 print_ret (The) noun, " is too big to fit.";
219           Open:
220             if (openedtray == 1) {
221                 score = score + 2;
222                 openedtray = 2;
223             }
224         ],
225         after [;
226           Open:
227             print_ret "You press the button and the CD tray pops out.";
228           Close:
229             if (disc in self) {
230                 deadflag = 5;
231                 print_ret
232                     "^With the CD in the tray, you quickly reboot the
233                     server.^^After the bios posts, your disc starts
234                     doing its thing and before you know it the server
235                     is happily running Trisquel, and even more than
236                     that, the beeping has stopped. Yay!";
237             }
238         ],
239   has   container openable scenery;
240
241 !=========================================================================
242 ! Entry point routines
243
244 [ Initialise;
245     location = break_room;
246     "^^^^It's Saturday, a nice one at that, and you've been called in
247     to fix a server that's on the blink. Again.^^You've had it. This
248     server is going to run GNU/Linux from this day forward! The
249     process will be easy - just put the disc into the server and away
250     we go. Now where is that Trisquel CD?^";
251 ];
252
253 [ Deathmessage;
254     if (deadflag == 5)
255         print "You have won";
256 ];
257
258 !=========================================================================
259 ! Standard and Extended Grammar
260 Include "grammar";
261 !=========================================================================