Change the Includes to lowercase
[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
40     "^An Interactive Fiction by Daniel Bartholomew.^";
41 Release 1; Serial "080625"; !for keeping track of public releases
42
43 Constant MAX_SCORE = 6;
44
45 Include "parser";
46 Include "verblib";
47
48 global openedbackpack = 1;
49 global openedtray = 1;
50 global takencd = 1;
51 global beeping = 1;
52
53 !=========================================================================
54 ! The Game Objects
55
56 Object break_room "Break Room"
57     with
58         description "Your standard break room. A fridge, and a long
59             counter take up one wall. East is the outside world and west
60             is the hallway to the server room.",
61         w_to hallway,
62         e_to "You take one look outside and think better of it. The
63             daystar is too bright and terrible to face today. Besides, you
64             have work to do.",
65     has light;
66
67 Object fridge "refrigerator" break_room
68     with
69         description "Your standard refrigerator.",
70         name 'fridge' 'refrigerator',
71     has container openable scenery;
72
73 Object counter "long counter" break_room
74     with
75         description "A long counter. You can't quite determine the color,
76             it's somewhere between green and brown. On the counter is a
77             microwave.",
78         name 'counter',
79     has static supporter scenery;
80
81 Object microwave "microwave" counter
82     with
83         description "Your standard microwave.",
84         name 'microwave' 'micro',
85     has container openable scenery;
86
87 Object table "Table" break_room
88     with
89         description "It's a table. Were you expecting something else?",
90         name 'table',
91     before [;
92         Take: "Let me spell it out for you: it is a T A B L E and you are
93                 NOT Superman.";
94     ],
95     has supporter;
96
97 Object backpack "backpack" table
98     with
99         description "Your backpack.",
100         name 'pack' 'back' 'bag' 'backpack', article "your",
101     before [;
102         Open:
103             if (openedbackpack == 1) {
104                 score = score + 2;
105                 openedbackpack = 2;
106             }
107     ],
108     has clothing container openable;
109
110 Object disc "Ubuntu CD" backpack
111     with
112         description "An automatic recovery CD, guaranteed to fix almost
113             any server.^^Ok, it's just an install CD that auto-installs
114             Ubuntu, but hey, if it works, it works.",
115         name 'disk' 'disc' 'Ubuntu' 'cd',
116     after [;
117         Take:
118             if (takencd == 1) {
119                 score = score + 2;
120                 takencd = 2;
121                 print_ret "You pick up the Ubuntu CD.^";
122             }
123     ],
124     has ;
125
126 Object hallway "Hallway"
127     with
128         description "Bereft of features, adornment or even adequate
129             lighting, this hallway is as plain as they come. Doors lead
130             east back to the break room, north to the server room, or west
131             to the restrooms.",
132         e_to break_room,
133         n_to server_room,
134         w_to "When nature calls, you'll know about it, but right now, it
135                 isn't calling.",
136         before [;
137             Go:
138                 if (noun == n_obj) {
139                     StartDaemon(server_room);
140                     print "^^You use your key card to open the server room
141                         door and step into your world.^";
142                 }
143         ],
144     has    light;
145
146 Object server_room "Server Room"
147     with
148         description "The fans, the lights, the chill . . . yep, it's a
149             server room. Full of servers from a dozen different
150             manufacturers, each with their own quirks.^^Your attention is
151             immediately drawn to a server 2/3 of the way up rack 7. The
152             little indicator light is blinking red, and it is beeping.",
153         s_to hallway,
154         daemon [;
155             if (location ~= server_room) return;
156             beeping = random(7);
157             switch (beeping) {
158                 1: "^The beeping is driving you crazy.";
159                 2: "^It's hard to think, with all of the beeping.";
160                 3: "^The monotony of the beeping is maddening.";
161                 4: "^You can't stand the beeping.";
162                 5: "^The beeping reminds you of your alarm clock.";
163                 6: "^beep . . . beep . . . beep . . . beep . . . beep
164                      . . . beep . . .";
165                 7: "^If you don't stop the beeping soon, you'll loose what
166                     little hair you have left.";
167             }
168         ],
169     has    light;
170
171 Object server "server" server_room
172     with
173         description "The indicator light on this ancient server is
174             blinking orange. The rest the front is featureless except for
175             the CD tray. The beeping seems to emanate from somewhere
176             inside the server.",
177         name 'server' 'machine' 'computer' 'ancient' 'old',
178     has scenery;
179
180 Object tray "tray" server_room
181     with
182         description "It's a CD tray. Just like every other CD tray.",
183         name 'cd' 'tray',
184     before [;
185         Open:
186             if (openedtray == 1) {
187                 score = score + 2;
188                 openedtray = 2;
189             }
190     ],
191     after [;
192         Open:
193             print_ret "You press the button and the CD tray pops out.";
194         Close:
195             if (disc in self) {
196                 deadflag = 5;
197                 print_ret "^With the CD in the tray, you quickly reboot
198                     the server.^^After the bios posts, your disc starts
199                     doing its thing and before you know it the server is
200                     happily running Ubuntu, and even more than that, the
201                     beeping has stopped. Yay!";
202             }
203     ],
204     has container openable scenery;
205
206 !=========================================================================
207 ! Entry point routines
208
209 [ Initialise;
210     location = break_room;
211     "^^^^It's Saturday, a nice one at that, and you've been called in to
212         fix a server that's on the blink. Again.^^You've had it. This
213         server is going to run Linux from this day forward! The process
214         will be easy - just put the disc into the server and away we go.
215         Now where is that Ubuntu CD?^";
216 ];
217
218 [ Deathmessage;
219     if (deadflag == 5) print "You have won";
220 ];
221
222 !=========================================================================
223 ! Standard and Extended Grammar
224
225 Include "grammar";
226
227 !=========================================================================