Objects
constObjects:object
Defined in: server/api.d.ts:1762
Doors, locks and containers, by the form ID of their placed reference. The server knows only what changed this session; the rest is as the data files place it, which only a client loads.
Type Declaration
Section titled “Type Declaration”getContainer()
Section titled “getContainer()”getContainer(
ref):InventoryItem[] |null
What a container holds.
Parameters
Section titled “Parameters”string | number
The placed reference’s form ID.
Returns
Section titled “Returns”InventoryItem[] | null
Null until a player or a script set its contents this session; before that, each client rolls its own.
getContainerHolder()
Section titled “getContainerHolder()”getContainerHolder(
ref):Player|null
The player whose menu has a container open; nobody else can take from it meanwhile.
Parameters
Section titled “Parameters”string | number
The placed reference’s form ID.
Returns
Section titled “Returns”Player | null
Null when nobody holds it.
getMovedPosition()
Section titled “getMovedPosition()”getMovedPosition(
ref):Vector3|null
Where a player’s build mode or a script last put a placed reference.
Parameters
Section titled “Parameters”string | number
The placed reference’s form ID.
Returns
Section titled “Returns”Vector3 | null
Null while it stands where the data files place it.
isActivationBlocked()
Section titled “isActivationBlocked()”isActivationBlocked(
ref):boolean|null
Whether a script blocked activating a reference.
Parameters
Section titled “Parameters”string | number
The placed reference’s form ID.
Returns
Section titled “Returns”boolean | null
Null when no script decided this session: the game’s own state stands, which blocks a settlement’s workbench until its quest gives it to the player.
isDoorOpen()
Section titled “isDoorOpen()”isDoorOpen(
ref):boolean|null
Whether a door stands open.
Parameters
Section titled “Parameters”string | number
The placed reference’s form ID.
Returns
Section titled “Returns”boolean | null
Null when nobody moved it this session.
isEnabled()
Section titled “isEnabled()”isEnabled(
ref):boolean|null
Whether a script left a reference in the world or took it out.
Parameters
Section titled “Parameters”string | number
The placed reference’s form ID.
Returns
Section titled “Returns”boolean | null
Null when no script decided this session: the game’s own state stands.
isLocked()
Section titled “isLocked()”isLocked(
ref):boolean|null
Whether a door or container is locked.
Parameters
Section titled “Parameters”string | number
The placed reference’s form ID.
Returns
Section titled “Returns”boolean | null
Null when nobody changed its lock this session.
move()
Section titled “move()”move(
ref,position,angle?):boolean
Moves a placed reference for everyone, players who join later included, as a player moving it in a settlement’s build mode does: the power it receives through the air and its wires follow it.
Parameters
Section titled “Parameters”string | number
The placed reference’s form ID.
position
Section titled “position”Where it stands now.
angle?
Section titled “angle?”Its rotation, radians.
Returns
Section titled “Returns”boolean
False for a reference the session scrapped or a pose that is not finite.
setActivationBlocked()
Section titled “setActivationBlocked()”setActivationBlocked(
ref,blocked):void
Blocks or allows activating a reference for everyone, players who join later included. Allowing a settlement’s workbench lets players enter its build mode.
Parameters
Section titled “Parameters”string | number
The placed reference’s form ID.
blocked
Section titled “blocked”boolean
Blocked or allowed.
Returns
Section titled “Returns”void
setContainer()
Section titled “setContainer()”setContainer(
ref,items):boolean
Fills a container for everyone.
Parameters
Section titled “Parameters”string | number
The placed reference’s form ID.
object[]
Exactly what it should hold.
Returns
Section titled “Returns”boolean
False past 1024 kinds of item.
setDoorOpen()
Section titled “setDoorOpen()”setDoorOpen(
ref,open):void
Opens or closes a door for everyone, players who join later included.
Parameters
Section titled “Parameters”string | number
The placed reference’s form ID.
boolean
Open or closed.
Returns
Section titled “Returns”void
setEnabled()
Section titled “setEnabled()”setEnabled(
ref,enabled):void
Takes a reference the data files place out of every player’s world, as ObjectReference.Disable does, or puts it back, players who join later included: a barricade torn down, a door bricked up, a prop shown for an event. Held against the game’s own scripts and cell loads, which put references back as they please.
Parameters
Section titled “Parameters”string | number
The placed reference’s form ID.
enabled
Section titled “enabled”boolean
In the world, or out of it.
Returns
Section titled “Returns”void
setLocked()
Section titled “setLocked()”setLocked(
ref,locked):void
Locks or unlocks a door or container for everyone.
Parameters
Section titled “Parameters”string | number
The placed reference’s form ID.
locked
Section titled “locked”boolean
Locked or not.
Returns
Section titled “Returns”void