mirror of
https://github.com/He4eT/simple-tads-game.git
synced 2026-05-04 17:07:24 +00:00
Add locker to the tirdRoom
This commit is contained in:
parent
88917a273d
commit
117fea0594
3 changed files with 61 additions and 1 deletions
1
index.t
1
index.t
|
|
@ -35,6 +35,7 @@ gameMain: GameMainDef
|
|||
#include "items/oldDoor.t"
|
||||
#include "items/brokenDoor.t"
|
||||
#include "items/potion.t"
|
||||
#include "items/locker.t"
|
||||
|
||||
#include "characters/pc.t"
|
||||
#include "characters/dude.t"
|
||||
|
|
|
|||
57
items/locker.t
Normal file
57
items/locker.t
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
locker: LockableContainer, Fixture
|
||||
'locker'
|
||||
'locker'
|
||||
"A standard metal locker stands in the corner, slightly worn but sturdy.
|
||||
Its surface is a matte, muted gray with faint scratches and small dents,
|
||||
evidence of years of use. You could see an attached keypad.\n "
|
||||
location = thirdRoom
|
||||
isListed = true
|
||||
initiallyLocked = true
|
||||
;
|
||||
|
||||
+ Wearable
|
||||
'pair/sock*socks'
|
||||
'pair of socks'
|
||||
"A pair of white socks. "
|
||||
dobjFor (Wear) {
|
||||
verify () {
|
||||
illogical('It turned out that the socks are the wrong size for you.');
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
/* */
|
||||
|
||||
modify VerbRule(SetTo)
|
||||
('press' | 'input') singleLiteral ('on' | 'with') singleDobj
|
||||
: /* empty */
|
||||
;
|
||||
|
||||
numpad: Dial, Component
|
||||
'electronic locking device/numpad/keyboard/keypad'
|
||||
'numpad keyboard'
|
||||
"An electronic device with a numeric keypad and a small 4-digit display.\n
|
||||
Apparently, you can type a passcode on this keyboard to open the locker. "
|
||||
location = thirdRoom
|
||||
|
||||
makeSetting(val) {
|
||||
curSetting = val is in (secondRoom.wallCode)
|
||||
? val
|
||||
: '0';
|
||||
}
|
||||
|
||||
dobjFor (TypeLiteralOn) remapTo(SetTo, self, OtherObject)
|
||||
|
||||
dobjFor (SetTo) {
|
||||
action () {
|
||||
inherited;
|
||||
if (curSetting == secondRoom.wallCode) {
|
||||
locker.makeLocked(nil);
|
||||
locker.makeOpen(true);
|
||||
"The locker opened with a click. ";
|
||||
} else {
|
||||
"You heard an annoying sound and a red light flashed on the keypad. ";
|
||||
}
|
||||
}
|
||||
}
|
||||
;
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
secondRoom: Room 'Second Room'
|
||||
"This is another boring room with a few balloons and a painting on the wall. "
|
||||
wallCode = '3339'
|
||||
roomParts = (inherited() - [defaultEastWall] + [secondRoomEastWall])
|
||||
north = startingRoom
|
||||
south = oldDoorOutside
|
||||
|
|
@ -31,5 +32,6 @@ secondRoom: Room 'Second Room'
|
|||
'painting/image/picture/drawing*drawings'
|
||||
'picture on the wall'
|
||||
"Unframed reproduction of a famous painting glued to the wall.\n
|
||||
In the corner, someone wrote four digits with a pink marker: <b>3339</b>. "
|
||||
In the corner, someone wrote four digits with a pink marker:
|
||||
<b><<secondRoom.wallCode>></b>. "
|
||||
;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue