kts.LockDoor

Name

kts.LockDoor – lock a door or chest tile

Synopsis

kts.LockDoor(pos, lock)

Description

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).

Return Value

No value is returned.

Errors

If pos is not a valid dungeon position then an error is reported.

Notes

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.

Examples

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.

See Also

kts.CloseDoor

kts.IsDoorOpen

kts.OpenDoor

kts.OpenOrCloseDoor

kts.Tile