From 6264e881b8078d5bae361a0e2dda80ab9fc25999 Mon Sep 17 00:00:00 2001 From: He4eT Date: Sat, 21 Mar 2020 03:02:50 +0500 Subject: [PATCH] Elevator --- experiment.t | 3 +++ src/actor/surgeryAssistant.t | 2 +- src/item/elevator.t | 43 ++++++++++++++++++++++++++++++++++++ src/item/lockers.t | 9 ++++++++ src/item/whitePanels.t | 3 ++- src/room/blackRoom.t | 16 ++++++++++++++ src/room/pinkRoom.t | 11 +++------ test/gotoPinkRoom | 2 ++ 8 files changed, 79 insertions(+), 10 deletions(-) create mode 100644 src/item/elevator.t create mode 100644 src/room/blackRoom.t diff --git a/experiment.t b/experiment.t index daccff2..bdefb54 100644 --- a/experiment.t +++ b/experiment.t @@ -64,7 +64,10 @@ gameMain: GameMainDef #include "src/room/pinkRoom.t" #include "src/item/labCoat.t" #include "src/item/lockers.t" +#include "src/item/elevator.t" #include "src/room/redRoom.t" #include "src/item/dataCable.t" #include "src/actor/surgeryAssistant.t" + +#include "src/room/blackRoom.t" diff --git a/src/actor/surgeryAssistant.t b/src/actor/surgeryAssistant.t index 1402b26..b1e0eaf 100644 --- a/src/actor/surgeryAssistant.t +++ b/src/actor/surgeryAssistant.t @@ -52,7 +52,7 @@ surgeryAssistant: Person specialDesc = " The surgical assistant examines the room. " stateDesc = " -
Cameras are scanning the room. +
Cameras are scanning the room, various servos, units and cables make distinctive sounds, the bulky arms slowly sway. " ; diff --git a/src/item/elevator.t b/src/item/elevator.t new file mode 100644 index 0000000..6a21ddf --- /dev/null +++ b/src/item/elevator.t @@ -0,0 +1,43 @@ +elevatorDoor: LockableWithKey, Door + -> blackElevatorDoor + 'elevator door*doors' + 'elevator' + @pinkRoom + " Steel doors marked restricted access. +
There is a card reader on the right. " + + keyList = [ keycard ] + knownKeyList = [ keycard ] + specialNominalRoomPartLocation = defaultSouthWall + + openStatus { + return '
The elevator doors are <>'; + } + + dobjFor (UnlockWith) { + action () { + inherited; + self.makeOpen(true); + " A few seconds later + the elevator arrived on the floor. "; + } + } + + noteTraversal (traveler) { + " There is no controls inside. +
After you entered, the doors closed, + and after a while the elevator + stopped on another floor. "; + } +; + ++ Decoration, RoomPartItem + 'keycard card reader' + 'keycard reader' + " Small security device without any visible indicators. +
You can unlock the elevator doors + using a suitable key card. " + specialNominalRoomPartLocation = defaultSouthWall +; diff --git a/src/item/lockers.t b/src/item/lockers.t index 4699c4e..35f73c7 100644 --- a/src/item/lockers.t +++ b/src/item/lockers.t @@ -63,3 +63,12 @@ modify VerbRule(SetTo) "The sign reads Alice Dash.\b" code = '1984' ; + +++ keycard: Key + 'key/card/keycard' + 'keycard' + " It's a standard format keycard. +
On the front side is the name + Alice Dash and a barcode. +
The reverse side is empty. " +; diff --git a/src/item/whitePanels.t b/src/item/whitePanels.t index c80bf4b..a229143 100644 --- a/src/item/whitePanels.t +++ b/src/item/whitePanels.t @@ -9,6 +9,7 @@ yellowRoom, cyanRoom, pinkRoom, - redRoom + redRoom, + blackRoom ] ; diff --git a/src/room/blackRoom.t b/src/room/blackRoom.t new file mode 100644 index 0000000..10f7fac --- /dev/null +++ b/src/room/blackRoom.t @@ -0,0 +1,16 @@ +blackRoom: Room + 'Long corridor' + " Long corridor. + + <> + <>" +; + ++ blackElevatorDoor: IndirectLockable, Door, RoomPartItem + 'elevator door*doors' + 'elevator doors' + " Steel doors marked restricted access. +
There are no controls here." + + specialNominalRoomPartLocation = defaultWestWall +; diff --git a/src/room/pinkRoom.t b/src/room/pinkRoom.t index 20eb382..72e5c5f 100644 --- a/src/room/pinkRoom.t +++ b/src/room/pinkRoom.t @@ -1,9 +1,11 @@ pinkRoom: Room 'Changing room' " An elevator vestibule with a row of lockers, - a dumpster and posters with safety rules. " + a dumpster and posters with safety rules. +
You can see the elevator doors on the north wall. " east = cyanRoom + south = elevatorDoor ; + Decoration @@ -21,13 +23,6 @@ pinkRoom: Room ]} ; -+ Decoration, RoomPartItem - 'keycard reader' - 'keycard reader' - "Small security device without any visible indicators. " - specialNominalRoomPartLocation = defaultSouthWall -; - + Decoration 'dumpster label' 'dumpster label' diff --git a/test/gotoPinkRoom b/test/gotoPinkRoom index e85bbcc..dc141ba 100644 --- a/test/gotoPinkRoom +++ b/test/gotoPinkRoom @@ -7,3 +7,5 @@ >s >take tape >w +>type 1984 on numpad +>take keycard