kts.LockDoor – lock a door or chest tile
kts.LockDoor(pos, lock)
Sets the door at position pos
to be locked.
The lock type (a number from 1 to 3) is given by the lock
parameter. Alternatively, lock
can be "pick_only"
to make the door unlockable only with lockpicks, and not with keys; or "special"
to make the door "special-locked" (this means the door can be opened only with switches, and not with either keys or lockpicks).
No value is returned.
If pos
is not a valid dungeon position then an error is reported.
This currently is only used in the Tutorial, where it sets up some locked doors, for the player to experiment with once they reach that part of the tutorial map.
kts.LockDoor({x=23,y=20}, 1)
This makes the door at position (23, 20) locked with key number 1.
kts.LockDoor({x=3,y=11}, "pick_only")
This makes the door at position (3, 11) locked. No key will open it, but lockpicks will work.