Doors
constDoors:object
Defined in: client/api.d.ts:2948
Logic locks and loaded physical doors.
Type Declaration
Section titled “Type Declaration”held()
Section titled “held()”held():
HeldDoorState[]
Door state the server holds, re-applied to each door as it streams in.
Returns
Section titled “Returns”isSuperAlohomora()
Section titled “isSuperAlohomora()”isSuperAlohomora():
boolean
Whether the lock master key is on.
Returns
Section titled “Returns”boolean
isUnlocked()
Section titled “isUnlocked()”isUnlocked(
lockId):boolean|null
Reads a logic lock.
Parameters
Section titled “Parameters”lockId
Section titled “lockId”string
Returns
Section titled “Returns”boolean | null
list()
Section titled “list()”list(
radius?):DoorInfo[]
Lists nearby loaded doors.
Parameters
Section titled “Parameters”radius?
Section titled “radius?”number
Returns
Section titled “Returns”DoorInfo[]
openNearby()
Section titled “openNearby()”openNearby(
radius?):number
Opens nearby doors.
Parameters
Section titled “Parameters”radius?
Section titled “radius?”number
Returns
Section titled “Returns”number
policy()
Section titled “policy()”policy():
DoorPolicy
The streamed-door enforcement policy last set.
Returns
Section titled “Returns”setLock()
Section titled “setLock()”setLock(
lockId,unlocked?):boolean
Sets a logic lock for the rest of the session: now, and again after every world load (which puts logic locks back to the game’s defaults), until disconnect. Opening M_OLI_01_HogwartsExteriors also takes down the glass walls fencing the castle’s southern exits, the boathouse stairway gate among them, which the game removes only as their level loads. False when there is no lock manager yet; the next world load still applies it.
Parameters
Section titled “Parameters”lockId
Section titled “lockId”string
unlocked?
Section titled “unlocked?”boolean
Returns
Section titled “Returns”boolean
setLocked()
Section titled “setLocked()”setLocked(
selector,locked?):number
Locks or unlocks, on this client only, every loaded door matching an actor name, a persistent id (holds ‘:’) or an asset path (holds ‘/’). A restream undoes it; the server’s Doors.set holds. Returns how many matched.
Parameters
Section titled “Parameters”selector
Section titled “selector”string
locked?
Section titled “locked?”boolean
Returns
Section titled “Returns”number
setOpen()
Section titled “setOpen()”setOpen(
name,open?):boolean
Changes one door.
Parameters
Section titled “Parameters”string
boolean
Returns
Section titled “Returns”boolean
setPolicy()
Section titled “setPolicy()”setPolicy(
policy):number
Sets streamed-door enforcement and applies it to every loaded door; returns how many were checked.
Parameters
Section titled “Parameters”policy
Section titled “policy”Returns
Section titled “Returns”number
superAlohomora()
Section titled “superAlohomora()”superAlohomora(
enable?):boolean
Toggles the lock master key: every lock opens to a key or Alohomora press, whatever the player’s Alohomora level, key-only locks included. Server-held locks still refuse. Cleared on disconnect. False when the key could not be reached.
Parameters
Section titled “Parameters”enable?
Section titled “enable?”boolean
Returns
Section titled “Returns”boolean
unlockNearby()
Section titled “unlockNearby()”unlockNearby(
radius?):number
Unlocks nearby doors.
Parameters
Section titled “Parameters”radius?
Section titled “radius?”number
Returns
Section titled “Returns”number