Elevator key check

This commit is contained in:
He4eT 2020-03-29 12:20:30 +05:00
commit 73093d97e7
2 changed files with 20 additions and 4 deletions

View file

@ -18,10 +18,13 @@ elevatorDoor: LockableWithKey, Door
dobjFor (UnlockWith) {
action () {
inherited;
self.makeOpen(true);
" A few seconds later
the elevator arrived on the floor. ";
if (keyFitsLock(gIobj)) {
self.makeOpen(true);
" A few seconds later
the elevator arrived on the floor. ";
} else {
" You can't apply this to a card reader. ";
}
}
}