mirror of
https://github.com/He4eT/yet-another-experiment.git
synced 2026-05-04 16:47:22 +00:00
Elevator key check
This commit is contained in:
parent
709931441b
commit
73093d97e7
2 changed files with 20 additions and 4 deletions
|
|
@ -18,10 +18,13 @@ elevatorDoor: LockableWithKey, Door
|
||||||
|
|
||||||
dobjFor (UnlockWith) {
|
dobjFor (UnlockWith) {
|
||||||
action () {
|
action () {
|
||||||
inherited;
|
if (keyFitsLock(gIobj)) {
|
||||||
self.makeOpen(true);
|
self.makeOpen(true);
|
||||||
" A few seconds later
|
" A few seconds later
|
||||||
the elevator arrived on the floor. ";
|
the elevator arrived on the floor. ";
|
||||||
|
} else {
|
||||||
|
" You can't apply this to a card reader. ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
13
test/unlockElevatorWithWrongKey
Normal file
13
test/unlockElevatorWithWrongKey
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
>turn on the light
|
||||||
|
>w
|
||||||
|
>open locker
|
||||||
|
>take floss
|
||||||
|
>e
|
||||||
|
>s
|
||||||
|
>s
|
||||||
|
>take tape
|
||||||
|
>w
|
||||||
|
>open dumpster
|
||||||
|
>search cloth
|
||||||
|
>take key
|
||||||
|
>unlock elevator with tubular key
|
||||||
Loading…
Add table
Add a link
Reference in a new issue