diff --git a/src/item/elevator.t b/src/item/elevator.t index 16b729f..801a54f 100644 --- a/src/item/elevator.t +++ b/src/item/elevator.t @@ -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. "; + } } } diff --git a/test/unlockElevatorWithWrongKey b/test/unlockElevatorWithWrongKey new file mode 100644 index 0000000..fa039ec --- /dev/null +++ b/test/unlockElevatorWithWrongKey @@ -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