Breakables
constBreakables:object
Defined in: client/api.d.ts:1156
Repairable world objects (statues, armour): server-owned broken/repaired state.
Type Declaration
Section titled “Type Declaration”applyStates()
Section titled “applyStates()”applyStates(
states,instant?):number
Records a full state list (instant by default) and returns how many applied to loaded objects.
Parameters
Section titled “Parameters”states
Section titled “states”instant?
Section titled “instant?”boolean
Returns
Section titled “Returns”number
arm():
boolean
Watches the game’s repair-done and fully-broken events; the local player’s own changes surface as the breakableState event.
Returns
Section titled “Returns”boolean
clear()
Section titled “clear()”clear():
void
Forgets every recorded state.
Returns
Section titled “Returns”void
isInstalled()
Section titled “isInstalled()”isInstalled():
boolean
Whether the game-event hook is live.
Returns
Section titled “Returns”boolean
list()
Section titled “list()”list(
radius?):BreakableInfo[]
Loaded repairables, nearest first; radius 0 or omitted lists all.
Parameters
Section titled “Parameters”radius?
Section titled “radius?”number
Returns
Section titled “Returns”rescan()
Section titled “rescan()”rescan():
number
Re-indexes every loaded cell and re-applies; returns the recorded state count.
Returns
Section titled “Returns”number
setState()
Section titled “setState()”setState(
uid,state,instant?):boolean
Records the server’s state for one object and applies it if loaded (animated repair unless instant). Re-applied whenever its cell streams in.
Parameters
Section titled “Parameters”number
string
instant?
Section titled “instant?”boolean
Returns
Section titled “Returns”boolean