Line data Source code
1 : /*
2 : Created by Daniel Monteiro on 2019-07-26.
3 : */
4 :
5 : #include <stddef.h>
6 :
7 : #ifndef SMD
8 :
9 : #include <string.h>
10 :
11 : #ifdef WIN32
12 : #include "Win32Int.h"
13 : #else
14 :
15 : #include <stdint.h>
16 :
17 : #endif
18 : #else
19 : #include <genesis.h>
20 : #endif
21 :
22 : #include "Enums.h"
23 : #include "Common.h"
24 : #include "Core.h"
25 : #include "Derelict.h"
26 :
27 :
28 : uint8_t accessGrantedToSafe = FALSE;
29 :
30 0 : void grantAccessToSafe(void) {
31 0 : accessGrantedToSafe = TRUE;
32 0 : }
33 :
34 0 : uint8_t isAccessToSafeGranted(void) {
35 0 : return accessGrantedToSafe;
36 : }
37 :
38 20 : void updateRankFromKeycards(void) {
39 20 : uint8_t rank = 0;
40 :
41 20 : if (playerHasObject("low-rank-keycard")) {
42 7 : rank = 1;
43 : }
44 :
45 20 : if (playerHasObject("hacked-keycard")) {
46 3 : rank = 2;
47 : }
48 :
49 20 : if (playerHasObject("high-rank-keycard")) {
50 3 : rank = 3;
51 : }
52 :
53 20 : if (playerHasObject("root-keycard")) {
54 4 : rank = 4;
55 : }
56 :
57 20 : setPlayerRank(rank);
58 20 : }
59 :
60 13 : void keycardPickCallback(struct Item *item) {
61 : (void)item;
62 13 : updateRankFromKeycards();
63 13 : }
64 :
65 :
66 7 : void keycardDropCallback(struct Item *item) {
67 : (void)item;
68 7 : updateRankFromKeycards();
69 7 : }
70 :
71 :
72 2 : void useCardWithCardWriter(struct Item *item1, struct Item *item2) {
73 3 : if (item1 == getItemNamed("low-rank-keycard") && item2 == getItemNamed("card-writer")) {
74 1 : struct Item *card = getItemNamed("hacked-keycard");
75 1 : addToRoom("computer-core", card);
76 1 : dropObjectByName("low-rank-keycard");
77 1 : removeObjectFromRoom(getItemNamed("low-rank-keycard"));
78 1 : defaultLogger("Card credentials overridden.\nHacked card emitted.");
79 : } else {
80 1 : defaultLogger("No effect");
81 : }
82 2 : }
83 :
84 2 : void useBootsWithMagneticCoupling(struct Item *item1, struct Item *item2) {
85 2 : struct Item *coupling = getItemNamed("magnetic-coupling");
86 2 : struct Item *boots = getItemNamed("magnetic-boots");
87 2 : if (item1 == boots && item2 == coupling) {
88 1 : coupling->active = FALSE;
89 1 : defaultLogger("Magnetic lock disengaged");
90 : } else {
91 1 : defaultLogger("No effect");
92 : }
93 2 : }
94 :
95 : /*
96 : Good victory - you blew the station and escaped
97 : Bad victory - you blew the station, but died
98 : good game over - you escaped, but failed to blow the station
99 : bad game over - you failed to blow the station and died.
100 : */
101 6 : void bombActivatedCallback(struct Item *item) {
102 6 : uint8_t empOnReactor = hasItemInRoom("reactor-core", "emp-bomb");
103 6 : uint8_t playerLocation = getPlayerRoom();
104 6 : uint8_t playerAtDaedaus = (playerLocation == 1);
105 6 : uint8_t playerAtSameLocationAsBomb = hasItemInRoom(getRoom(playerLocation)->name, "emp-bomb");
106 : (void)item;
107 :
108 6 : if (empOnReactor) {
109 3 : if (playerAtDaedaus) {
110 2 : setGameStatus(kGoodVictory);
111 : } else {
112 1 : setGameStatus(kBadVictory);
113 : }
114 : } else {
115 3 : if (playerAtSameLocationAsBomb) {
116 1 : setGameStatus(kBadGameOver);
117 : } else {
118 2 : if (playerAtDaedaus) {
119 1 : setGameStatus(kGoodGameOver);
120 : } else {
121 1 : setGameStatus(kBadGameOver);
122 : }
123 : }
124 : }
125 6 : }
126 :
127 5 : void bombControllerActivatedCallback(struct Item *item) {
128 : (void)item;
129 5 : bombActivatedCallback(NULL);
130 5 : }
131 :
132 4 : void elevatorGoDownCallback(struct Item *item) {
133 : struct ObjectNode *currentItem;
134 : struct ObjectNode *nextItem;
135 : uint8_t newRoom;
136 :
137 :
138 4 : if (!getItemNamed("comm-terminal-2")->active) {
139 1 : defaultLogger("Central computer is offline");
140 1 : return;
141 : }
142 :
143 3 : newRoom = getRoom(getPlayerRoom())->connections[4];
144 3 : currentItem = getRoom(getPlayerRoom())->itemsPresent->next;
145 :
146 10 : while (currentItem != NULL && getItem(currentItem->item) != NULL) {
147 :
148 7 : nextItem = currentItem->next;
149 :
150 7 : if (getItem(currentItem->item)->pickable) {
151 1 : item = getItem(currentItem->item);
152 : /* this will already remove it from the room */
153 1 : addObjectToRoom(newRoom, item);
154 : }
155 :
156 7 : currentItem = nextItem;
157 : }
158 :
159 3 : moveBy(4);
160 : }
161 :
162 4 : void elevatorGoUpCallback(struct Item *item) {
163 :
164 : struct ObjectNode *currentItem;
165 : struct ObjectNode *nextItem;
166 : uint8_t newRoom;
167 :
168 4 : if (!getItemNamed("comm-terminal-2")->active) {
169 1 : defaultLogger("Central computer is offline");
170 1 : return;
171 : }
172 :
173 3 : newRoom = getRoom(getPlayerRoom())->connections[5];
174 3 : currentItem = getRoom(getPlayerRoom())->itemsPresent->next;
175 :
176 10 : while (currentItem != NULL && getItem(currentItem->item) != NULL) {
177 :
178 7 : nextItem = currentItem->next;
179 :
180 7 : if (getItem(currentItem->item)->pickable) {
181 1 : item = getItem(currentItem->item);
182 : /* This will already remove it from the room */
183 1 : addObjectToRoom(newRoom, item);
184 : }
185 :
186 7 : currentItem = nextItem;
187 : }
188 :
189 3 : moveBy(5);
190 : }
191 :
192 4 : void useCloggedFlush(struct Item *item) {
193 4 : struct Item *highRankKeycard = getItemNamed("high-rank-keycard");
194 : (void)item;
195 :
196 4 : if (highRankKeycard->roomId == 0 && !playerHasObject("high-rank-keycard")) {
197 2 : defaultLogger("Found something among the\n...stuff...");
198 2 : addToRoom("wc", highRankKeycard);
199 : }
200 4 : }
201 :
202 1 : void useRegularFlush(struct Item *item) {
203 : (void)item;
204 1 : defaultLogger("*FLUSH*");
205 1 : }
206 :
207 0 : void inspectItemWithHelmetCallback(struct Item *helmet, struct Item *item) {
208 : (void)helmet;
209 : (void)item;
210 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
211 : defaultLogger(item->info);
212 : #endif
213 0 : }
214 :
215 1 : void useKeycardWith(struct Item *item1, struct Item *item2) {
216 1 : if (item2 == getItemNamed("comm-terminal-1") ||
217 0 : item2 == getItemNamed("comm-terminal-2") ||
218 0 : item2 == getItemNamed("comm-terminal-3")) {
219 :
220 1 : defaultLogger("Computer node rebooted");
221 1 : item2->active = TRUE;
222 1 : return;
223 : }
224 :
225 0 : defaultLogger("Keycard can't be used with that");
226 : }
227 :
228 : /**
229 : * TODO: change name for this function
230 : * @param item
231 : */
232 4 : void useComputerRack(struct Item *item) {
233 : (void)item;
234 4 : if (!getItemNamed("comm-terminal-1")->active ||
235 2 : !getItemNamed("comm-terminal-2")->active ||
236 2 : !getItemNamed("comm-terminal-3")->active) {
237 2 : defaultLogger("Central computer is offline");
238 2 : return;
239 : }
240 :
241 :
242 2 : if (accessGrantedToSafe) {
243 1 : defaultLogger("Safe unlocked");
244 1 : addToRoom("situation-room", getItemNamed("root-keycard"));
245 1 : return;
246 : }
247 :
248 1 : defaultLogger("Safe secured");
249 : }
250 :
251 1 : void reactorValveCallback(struct Item *item) {
252 : (void)item;
253 1 : setGameStatus(kBadVictory);
254 1 : }
255 :
256 53 : void initStation(void) {
257 :
258 : struct Item *newItem;
259 : int8_t connections[6];
260 53 : accessGrantedToSafe = FALSE;
261 :
262 53 : initCore();
263 :
264 : /*Rooms*/
265 : /* 1 */
266 53 : memFill(&connections[0], 0, 6 * sizeof(int8_t));
267 53 : connections[0] = 2;
268 53 : addRoom(
269 : "lss-daedalus",
270 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
271 : "The salvage operations vehicle. It's\n"
272 : "tracked remotely, to prevent \n"
273 : "escapes. If I try taking outside \n"
274 : "the predicted path, I will sink into\n"
275 : "the abyss myself.",
276 : #endif
277 : 32, 32, 0, connections);
278 :
279 : /* 2 */
280 53 : connections[2] = 1;
281 53 : connections[1] = 6;
282 53 : connections[0] = 3;
283 53 : addRoom("hangar",
284 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
285 : "The main hangar is rather \n"
286 : "unremarkable. The only thing you \n"
287 : "notice is a slight yellow tint of \n"
288 : "the air, as if a mist slides next \n"
289 : "to the floor. It's very faint. Your\n"
290 : "ship's computer tells you this is\n"
291 : "harmless (as if those readings were\n"
292 : "worth the trust). Unfortunately, no\n"
293 : "useful tools around here. Around the\n"
294 : "corner, there's a escape pod entrance.\n"
295 : "Apparently, only one pod was launched.",
296 : #endif
297 : 32, 32, 0, connections);
298 :
299 : /* 3 */
300 53 : connections[2] = 0;
301 53 : connections[3] = 2;
302 53 : connections[0] = 4;
303 53 : connections[1] = 5;
304 53 : addRoom("hall-2",
305 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
306 : "A well lit hall, with doors. It's \n"
307 : "the main hub of the vehicle. Despite\n"
308 : "being right next to the hangar and\n"
309 : "the control room, it's rather quiet.",
310 : #endif
311 : 32, 32, 0, connections);
312 :
313 : /* 4 */
314 53 : memFill(&connections[0], 0, 6 * sizeof(int8_t));
315 53 : connections[2] = 3;
316 53 : connections[4] = 19;
317 53 : connections[5] = 13;
318 53 : addRoom("elevator-level-2",
319 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
320 : "It's rather surprising that this \n"
321 : "ship has an elevator. This is was\n"
322 : "typical only of ships with 5 levels\n"
323 : "or more.",
324 : #endif
325 53 : 64, 64, 0, connections)->rankRequired = 1;
326 :
327 : /* 5 */
328 53 : memFill(&connections[0], 0, 6 * sizeof(int8_t));
329 53 : connections[3] = 3;
330 53 : connections[1] = 9;
331 53 : connections[0] = 7;
332 53 : connections[2] = 8;
333 53 : addRoom("dorms-1",
334 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
335 : "Part of the dorms hallway. There are\n"
336 : "some (busted) control panels for \n"
337 : "ejecting the pods. Some pieces of \n"
338 : "cloth and broken plastic on the floor,\n"
339 : "but nothing really useful.",
340 : #endif
341 53 : 32, 32, 0, connections)->rankRequired = 1;
342 :
343 :
344 : /* 6 */
345 53 : memFill(&connections[0], 0, 6 * sizeof(int8_t));
346 53 : connections[3] = 2;
347 53 : addRoom("rls-bohr-2",
348 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
349 : "A rescue ship. Only for emergencies.\n"
350 : "Named after some Niels Bohr scientist\n"
351 : "guy or whatever. Some drops on the\n"
352 : "carpet and I don't even want know \n"
353 : "what it is, but I guess I already\n"
354 : "know. Ick.",
355 : #endif
356 : 64, 9, 0, connections);
357 :
358 :
359 : /* 7 */
360 53 : connections[3] = 0;
361 53 : connections[2] = 5;
362 53 : addRoom("pod-1",
363 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
364 : "A living pod. Looks like from one \n"
365 : "of the oficcers. It's messy, but \n"
366 : "as if it's occupant would easily \n"
367 : "find his belongings in there. \n"
368 : "There are some burn marks on the \n"
369 : "walls.",
370 : #endif
371 53 : 32, 32, 0, connections)->rankRequired = 1;
372 :
373 : /* 8 */
374 53 : connections[2] = 0;
375 53 : connections[0] = 5;
376 53 : addRoom("pod-2",
377 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
378 : "A empty living pod. Looks as if it\n"
379 : "was never ever used. If can even \n"
380 : "see some of the factory stickers \n"
381 : "in it.",
382 : #endif
383 53 : 32, 32, 0, connections)->rankRequired = 2;
384 :
385 : /* 9 */
386 53 : connections[1] = 12;
387 53 : connections[3] = 5;
388 53 : connections[0] = 10;
389 53 : connections[2] = 11;
390 53 : addRoom("dorms-2",
391 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
392 : "Anonther part of the dorms hallway.\n"
393 : "On those, the panels were visibly\n"
394 : "well. These parts of the quarters \n"
395 : "were probably the more prestigious ones.",
396 : #endif
397 53 : 32, 32, 0, connections)->rankRequired = 1;
398 :
399 : /* 10 */
400 53 : memFill(&connections[0], 0, 6 * sizeof(int8_t));
401 53 : connections[2] = 9;
402 53 : addRoom("pod-3",
403 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
404 : "A young woman's pod. You \n"
405 : "do recognize a few items, but its \n"
406 : "badly mixed up. It's hard to make \n"
407 : "the age of girl, but she was young.",
408 : #endif
409 53 : 32, 32, 0, connections)->rankRequired = 3;
410 :
411 : /* 11 */
412 53 : connections[2] = 0;
413 53 : connections[0] = 9;
414 53 : addRoom("pod-4",
415 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
416 : "A the first officer's pod, for sure.\n"
417 : "It's neat, clean and organized. Not \n"
418 : "much around. He had a strange \n"
419 : "fixation on redheads.",
420 : #endif
421 53 : 32, 32, 0, connections)->rankRequired = 4;
422 :
423 : /* 12 */
424 53 : connections[0] = 0;
425 53 : connections[3] = 9;
426 53 : addRoom("computer-core",
427 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
428 : "TBD.",
429 : #endif
430 : 32, 32, 0, connections);
431 :
432 : /* 13 */
433 53 : connections[3] = 0;
434 53 : connections[4] = 4;
435 53 : connections[2] = 14;
436 53 : addRoom("elevator-level-1",
437 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
438 : "It's rather surprising that this ship\n"
439 : "has an elevator. This is was typical \n"
440 : "only of ships with 5 levels or more.",
441 : #endif
442 53 : 32, 32, 0, connections)->rankRequired = 1;
443 :
444 : /* 14 */
445 53 : memFill(&connections[0], 0, 6 * sizeof(int8_t));
446 53 : connections[0] = 13;
447 53 : connections[1] = 17;
448 53 : connections[2] = 16;
449 53 : connections[3] = 15;
450 53 : addRoom("hall-1",
451 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
452 : "This hall has a busier feel.\n"
453 : "Here you see objects thrown all over \n"
454 : "the place, as if someone was in the \n"
455 : "middle of a day-to-day routine and had\n"
456 : "to quickly run.",
457 : #endif
458 53 : 32, 32, 0, connections)->rankRequired = 1;
459 :
460 : /* 15 */
461 53 : memFill(&connections[0], 0, 6 * sizeof(int8_t));
462 53 : connections[1] = 14;
463 53 : addRoom("bridge",
464 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
465 : "TBD.",
466 : #endif
467 53 : 32, 32, 0, connections)->rankRequired = 4;
468 :
469 : /* 16 */
470 53 : connections[1] = 0;
471 53 : connections[0] = 14;
472 53 : addRoom("situation-room",
473 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
474 : "TBD.",
475 : #endif
476 53 : 32, 32, 0, connections)->rankRequired = 3;
477 :
478 : /* 17 */
479 53 : connections[0] = 0;
480 53 : connections[3] = 14;
481 53 : connections[1] = 18;
482 53 : addRoom("crew-bunks",
483 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
484 : "TBD.",
485 : #endif
486 53 : 32, 32, 0, connections)->rankRequired = 1;
487 :
488 : /* 18 */
489 53 : connections[1] = 0;
490 53 : connections[3] = 17;
491 53 : addRoom("armory",
492 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
493 : "TBD",
494 : #endif
495 53 : 32, 32, 0, connections)->rankRequired = 3;
496 :
497 : /* 19 */
498 53 : connections[3] = 0;
499 53 : connections[2] = 20;
500 53 : connections[5] = 4;
501 53 : addRoom("elevator-level-3",
502 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
503 : "It's rather surprising that this ship has an\n"
504 : "elevator. This is was typical only of ships \n"
505 : "with 5 levels or more.",
506 : #endif
507 53 : 32, 32, 0, connections)->rankRequired = 1;
508 :
509 : /* 20 */
510 53 : memFill(&connections[0], 0, 6 * sizeof(int8_t));
511 53 : connections[0] = 19;
512 53 : connections[1] = 21;
513 53 : connections[3] = 23;
514 53 : addRoom("hall-3",
515 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
516 : "TBD",
517 : #endif
518 : 32, 32, 0, connections);
519 :
520 : /* 21 */
521 53 : connections[0] = 0;
522 53 : connections[3] = 20;
523 53 : connections[1] = 22;
524 53 : addRoom("wc",
525 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
526 : "TBD.",
527 : #endif
528 : 32, 32, 0, connections);
529 :
530 : /* 22 */
531 53 : connections[1] = 0;
532 53 : connections[3] = 21;
533 53 : addRoom("reactor-core",
534 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
535 : "TBD.",
536 : #endif
537 53 : 32, 32, 0, connections)->rankRequired = 4;
538 :
539 : /* 23 */
540 53 : connections[3] = 0;
541 53 : connections[1] = 20;
542 53 : addRoom("radar-array",
543 : #ifdef INCLUDE_ROOM_DESCRIPTIONS
544 : "TBD",
545 : #endif
546 53 : 32, 32, 0, connections)->rankRequired = 2;
547 :
548 :
549 : /*Items*/
550 53 : addItem("dummy",
551 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
552 : "ERROR",
553 : #endif
554 : #ifdef ITEMS_HAVE_WEIGHT
555 : 0,
556 : #endif
557 : FALSE, 0, 0);
558 :
559 : /* LSS-Daedalus */
560 53 : newItem = addItem("emp-bomb",
561 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
562 : "Time-programmable Halogen EMP bomb.\n"
563 : "Will disable any electrical device\n"
564 : "within the 50 nautical miles range.",
565 : #endif
566 : #ifdef ITEMS_HAVE_WEIGHT
567 : 5,
568 : #endif
569 : TRUE, 9, 6);
570 53 : addToRoom("lss-daedalus", newItem);
571 53 : newItem->useCallback = bombActivatedCallback;
572 :
573 :
574 53 : newItem = addItem("emp-controller",
575 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
576 : "The remote controller allows you to\n"
577 : "instantly detonate the bomb from very\n"
578 : "far (empirical evidence tells it \n"
579 : "works from as far as 200 nautical\n"
580 : "miles).",
581 : #endif
582 : #ifdef ITEMS_HAVE_WEIGHT
583 : 0,
584 : #endif
585 : TRUE, 10, 6);
586 53 : addToRoom("lss-daedalus", newItem);
587 53 : newItem->useCallback = bombControllerActivatedCallback;
588 :
589 53 : newItem = addItem("ship-ignition",
590 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
591 : "Token needed to ignite the ship's\n"
592 : "computer and thrusters",
593 : #endif
594 : #ifdef ITEMS_HAVE_WEIGHT
595 : 0,
596 : #endif
597 : TRUE, 11, 6);
598 53 : addToRoom("lss-daedalus", newItem);
599 53 : newItem->useCallback = bombActivatedCallback;
600 :
601 53 : newItem = addItem("magnetic-boots",
602 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
603 : "Boots with strong electro-magnets.\n"
604 : "Ideal for walking underwater...\n"
605 : "...as long as the surface in question\n"
606 : "is metallic (like most of the \n"
607 : "surfaces here).",
608 : #endif
609 : #ifdef ITEMS_HAVE_WEIGHT
610 : 2,
611 : #endif
612 : TRUE, 15, 15);
613 :
614 53 : newItem->active = TRUE;
615 53 : pickObject(newItem);
616 53 : newItem->pickable = FALSE;
617 53 : newItem->useWithCallback = useBootsWithMagneticCoupling;
618 :
619 53 : newItem = addItem("helmet",
620 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
621 : "Atmosphere-contained helmet for\n"
622 : "safety.",
623 : #endif
624 : #ifdef ITEMS_HAVE_WEIGHT
625 : 2,
626 : #endif
627 : TRUE, 15, 15);
628 53 : newItem->active = TRUE;
629 53 : pickObject(newItem);
630 53 : newItem->pickable = FALSE;
631 53 : newItem->useWithCallback = inspectItemWithHelmetCallback;
632 :
633 :
634 53 : newItem = addItem("low-rank-keycard",
635 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
636 : "Clearance for low rank. Oddly, \n"
637 : "this one is of the rewrittable kind;\n"
638 : "probably due to a field promotion.",
639 : #endif
640 : #ifdef ITEMS_HAVE_WEIGHT
641 : 0,
642 : #endif
643 : TRUE, 4, 7);
644 53 : addToRoom("hall-2", newItem);
645 53 : newItem->useWithCallback = useCardWithCardWriter;
646 53 : newItem->pickCallback = keycardPickCallback;
647 53 : newItem->dropCallback = keycardDropCallback;
648 :
649 :
650 53 : newItem = addItem("hacked-keycard",
651 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
652 : "Hacked keycard for mid-clearance\nrank.",
653 : #endif
654 : #ifdef ITEMS_HAVE_WEIGHT
655 : 0,
656 : #endif
657 : TRUE, 21, 9);
658 53 : newItem->useWithCallback = useKeycardWith;
659 53 : newItem->pickCallback = keycardPickCallback;
660 53 : newItem->dropCallback = keycardDropCallback;
661 :
662 : /* Hangar */
663 :
664 53 : newItem = addItem("magnetic-coupling",
665 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
666 : "Automatic seal activated by \nspecial safety protocols",
667 : #endif
668 : #ifdef ITEMS_HAVE_WEIGHT
669 : 17,
670 : #endif
671 : FALSE, 2, 2);
672 53 : addToRoom("hangar", newItem);
673 53 : newItem->active = TRUE;
674 :
675 : /* Comm terminals*/
676 :
677 53 : newItem = addItem("door-panel",
678 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
679 : "Special control for the door",
680 : #endif
681 : #ifdef ITEMS_HAVE_WEIGHT
682 : 200,
683 : #endif
684 : FALSE, 12, 3);
685 53 : addToRoom("hangar", newItem);
686 :
687 :
688 : /* Comm terminals*/
689 53 : newItem = addItem("comm-terminal-1",
690 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
691 : "Terminal for communicating with\nthe central computer.",
692 : #endif
693 : #ifdef ITEMS_HAVE_WEIGHT
694 : 200,
695 : #endif
696 : FALSE, 7, 2);
697 53 : addToRoom("hall-1", newItem);
698 :
699 :
700 53 : newItem = addItem("comm-terminal-2",
701 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
702 : "Terminal for communicating with\nthe central computer.",
703 : #endif
704 : #ifdef ITEMS_HAVE_WEIGHT
705 : 200,
706 : #endif
707 : FALSE, 6, 2);
708 53 : addToRoom("hall-2", newItem);
709 :
710 :
711 53 : newItem = addItem("comm-terminal-3",
712 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
713 : "Terminal for communicating with\nthe central computer.",
714 : #endif
715 : #ifdef ITEMS_HAVE_WEIGHT
716 : 200,
717 : #endif
718 : FALSE, 7, 2);
719 53 : addToRoom("hall-3", newItem);
720 :
721 : /* Diaries */
722 53 : newItem = addItem("black-diary",
723 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
724 : "...We meet every night in the rest\n"
725 : "room, to make out. I asked her for\n"
726 : "an access key for the armory - let's\n"
727 : " see if she keeps her promisse. If\n"
728 : "they catch me, I'm scr...",
729 : #endif
730 : #ifdef ITEMS_HAVE_WEIGHT
731 : 0,
732 : #endif
733 : TRUE, 4, 6);
734 53 : addToRoom("pod-1", newItem);
735 :
736 :
737 53 : newItem = addItem("blue-diary",
738 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
739 : "The growing discontent is very \n"
740 : "noticeable. I don't know for how\n"
741 : "long can we keep the situation\n"
742 : "stable. For safety, I gave the root\n"
743 : "keycard to first officer Costa.",
744 : #endif
745 : #ifdef ITEMS_HAVE_WEIGHT
746 : 0,
747 : #endif
748 : TRUE, 11, 8);
749 53 : addToRoom("pod-2", newItem);
750 :
751 :
752 53 : newItem = addItem("white-diary",
753 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
754 : "Crew is growing demotivated with\n"
755 : "all the combat exercises and no \n"
756 : "downtime. Don't know long can I\n"
757 : "keep the fact that we already lost\n"
758 : "the war. If anything goes wrong,\n"
759 : "the situation room will be our\n"
760 : "last stand.",
761 : #endif
762 : #ifdef ITEMS_HAVE_WEIGHT
763 : 0,
764 : #endif
765 : TRUE, 3, 2);
766 53 : addToRoom("pod-3", newItem);
767 :
768 :
769 53 : newItem = addItem("yellow-book",
770 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
771 : "Situation is hopeless. I must enact\n"
772 : "the security lockdown protocol and \n"
773 : "set the reactor to a low activity \n"
774 : "state. With luck, they will rescue \n"
775 : "us in the next weeks or so.",
776 : #endif
777 : #ifdef ITEMS_HAVE_WEIGHT
778 : 0,
779 : #endif
780 : TRUE, 5, 10);
781 53 : addToRoom("pod-4", newItem);
782 :
783 :
784 53 : newItem = addItem("log-book",
785 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
786 : "Power conduit on level 3 was restored\n"
787 : "without incidents.",
788 : #endif
789 : #ifdef ITEMS_HAVE_WEIGHT
790 : 1,
791 : #endif
792 : TRUE, 26, 8);
793 53 : addToRoom("crew-bunks", newItem);
794 :
795 : /* Misc */
796 53 : newItem = addItem("card-writer",
797 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
798 : "Terminal with card writer, connected\n"
799 : " to the main computer",
800 : #endif
801 : #ifdef ITEMS_HAVE_WEIGHT
802 : 3,
803 : #endif
804 : FALSE, 22, 10);
805 53 : addToRoom("computer-core", newItem);
806 :
807 :
808 53 : newItem = addItem("high-rank-keycard",
809 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
810 : "Clearance for high-rank officer.",
811 : #endif
812 : #ifdef ITEMS_HAVE_WEIGHT
813 : 0,
814 : #endif
815 : TRUE, 23, 17);
816 53 : newItem->useWithCallback = useKeycardWith;
817 53 : newItem->pickCallback = keycardPickCallback;
818 53 : newItem->dropCallback = keycardDropCallback;
819 :
820 :
821 53 : newItem = addItem("digital-safe",
822 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
823 : "A very valuable vintage rare and in\n"
824 : "working-conditions computer rack!",
825 : #endif
826 : #ifdef ITEMS_HAVE_WEIGHT
827 : 138,
828 : #endif
829 : FALSE, 16, 4);
830 53 : newItem->useCallback = useComputerRack;
831 53 : addToRoom("situation-room", newItem);
832 :
833 53 : newItem = addItem("computer-terminal",
834 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
835 : "An offline terminal connected to the\n"
836 : "computer node",
837 : #endif
838 : #ifdef ITEMS_HAVE_WEIGHT
839 : 138,
840 : #endif
841 : FALSE, 16, 5);
842 53 : newItem->useCallback = useComputerRack;
843 53 : addToRoom("situation-room", newItem);
844 :
845 :
846 53 : newItem = addItem("journal",
847 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
848 : "...and so you guys could just join in\n"
849 : "and see whats going on. I hope it is not\n"
850 : "too instrusive of me. To that, she just\n"
851 : "gave me a cold stare and...",
852 : #endif
853 : #ifdef ITEMS_HAVE_WEIGHT
854 : 0,
855 : #endif
856 : TRUE, 8, 6);
857 53 : addToRoom("situation-room", newItem);
858 :
859 53 : newItem = addItem("metal-mending",
860 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
861 : "A piece of metal that might be valuable.",
862 : #endif
863 : #ifdef ITEMS_HAVE_WEIGHT
864 : 74,
865 : #endif
866 : FALSE, 5, 4);
867 53 : addToRoom("radar-array", newItem);
868 :
869 :
870 53 : newItem = addItem("scientific-treatise",
871 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
872 : "Voynich Manuscript\nAnnottated Translation.\n"
873 : "Classical edition. It's badly burn't.\n"
874 : "Can't read it.",
875 : #endif
876 : #ifdef ITEMS_HAVE_WEIGHT
877 : 1,
878 : #endif
879 : TRUE, 17, 17);
880 53 : addToRoom("wc", newItem);
881 :
882 :
883 53 : newItem = addItem("clogged-flush",
884 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
885 : "There is so much matter in the pipe...",
886 : #endif
887 : #ifdef ITEMS_HAVE_WEIGHT
888 : 1,
889 : #endif
890 : FALSE, 22, 17);
891 53 : newItem->useCallback = useCloggedFlush;
892 53 : addToRoom("wc", newItem);
893 :
894 53 : newItem = addItem("flush",
895 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
896 : "Working dispose valve for a very basic need.",
897 : #endif
898 : #ifdef ITEMS_HAVE_WEIGHT
899 : 1,
900 : #endif
901 : FALSE, 18, 17);
902 53 : newItem->useCallback = useRegularFlush;
903 53 : addToRoom("wc", newItem);
904 :
905 :
906 53 : newItem = addItem("fuel-rods",
907 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
908 : "This is the source of all the trouble.\n"
909 : "Both now and then. Gotta find a way to\n"
910 : "eject those into the abyss.",
911 : #endif
912 : #ifdef ITEMS_HAVE_WEIGHT
913 : 209,
914 : #endif
915 : FALSE, 29, 10);
916 53 : addToRoom("reactor-core", newItem);
917 :
918 :
919 53 : newItem = addItem("reactor-valve-control",
920 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
921 : "This is the computer node that could be\n"
922 : "used to eject the rods into the abyss.",
923 : #endif
924 : #ifdef ITEMS_HAVE_WEIGHT
925 : 62,
926 : #endif
927 : FALSE, 21, 4);
928 53 : newItem->useCallback = reactorValveCallback;
929 53 : addToRoom("reactor-core", newItem);
930 :
931 :
932 53 : newItem = addItem("root-keycard",
933 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
934 : "Card for root access.",
935 : #endif
936 : #ifdef ITEMS_HAVE_WEIGHT
937 : 0,
938 : #endif
939 : TRUE, 16, 3);
940 53 : newItem->pickCallback = keycardPickCallback;
941 53 : newItem->dropCallback = keycardDropCallback;
942 :
943 : /* Elevator controls */
944 53 : newItem = addItem("elevator-level1-go-down",
945 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
946 : "Elevator controls - Go down.",
947 : #endif
948 : #ifdef ITEMS_HAVE_WEIGHT
949 : 0,
950 : #endif
951 : FALSE, 2, 0);
952 53 : newItem->useCallback = elevatorGoDownCallback;
953 53 : addToRoom("elevator-level-1", newItem);
954 :
955 53 : newItem = addItem("elevator-level2-go-down",
956 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
957 : "Elevator controls - Go down.",
958 : #endif
959 : #ifdef ITEMS_HAVE_WEIGHT
960 : 0,
961 : #endif
962 : FALSE, 2, 0);
963 53 : newItem->useCallback = elevatorGoDownCallback;
964 53 : addToRoom("elevator-level-2", newItem);
965 :
966 53 : newItem = addItem("elevator-level2-go-up",
967 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
968 : "Elevator controls - Go Up.",
969 : #endif
970 : #ifdef ITEMS_HAVE_WEIGHT
971 : 0,
972 : #endif
973 : FALSE, 3, 0);
974 53 : newItem->useCallback = elevatorGoUpCallback;
975 53 : addToRoom("elevator-level-2", newItem);
976 :
977 53 : newItem = addItem("elevator-level3-go-up",
978 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
979 : "Elevator controls - Go Up.",
980 : #endif
981 : #ifdef ITEMS_HAVE_WEIGHT
982 : 0,
983 : #endif
984 : FALSE, 3, 0);
985 53 : newItem->useCallback = elevatorGoUpCallback;
986 53 : addToRoom("elevator-level-3", newItem);
987 :
988 53 : newItem = addItem("the-mistral-report",
989 : #ifdef INCLUDE_ITEM_DESCRIPTIONS
990 : "RetroZaragoza Homebrew '18 awarded\nentry: A espionage-themed \nturn-based 3D RPG for MS-DOS,\nXBox One, Mac and Amiga.",
991 : #endif
992 : #ifdef ITEMS_HAVE_WEIGHT
993 : 200,
994 : #endif
995 : TRUE, 15, 19);
996 53 : addToRoom("crew-bunks", newItem);
997 53 : }
|