WorldResource
Defined in: server/api.d.ts:6518
A named world export loaded from mod.world_resources. Server-owned, with live access to its surviving props, effects, level edits, areas and patrol routes. Obtain handles through all or find; runtime loading, reloading and unloading are not exposed.
Methods
Section titled “Methods”
staticall():WorldResource[]
Defined in: server/api.d.ts:6575
Lists config-loaded world exports in configuration order. Empty before successful startup and after shutdown.
Returns
Section titled “Returns”WorldResource[]
A fresh array of resource handles.
find()
Section titled “find()”
staticfind(name):WorldResource|null
Defined in: server/api.d.ts:6582
Finds a config-loaded export by name. Throws for a non-string argument.
Parameters
Section titled “Parameters”string
Exact, case-sensitive resource name.
Returns
Section titled “Returns”WorldResource | null
The resource, or null when absent or startup has not completed.
Properties
Section titled “Properties”
readonlyareas:Area[]
Defined in: server/api.d.ts:6559
A fresh array of surviving exported areas in export order, excluding destroyed areas.
effects
Section titled “effects”
readonlyeffects:Vfx[]
Defined in: server/api.d.ts:6549
A fresh array of surviving effects in export order, excluding destroyed effects.
readonlylevel:string
Defined in: server/api.d.ts:6534
The exported game level, checked against the server level at startup. Empty after shutdown.
levelEdits
Section titled “levelEdits”
readonlylevelEdits:LevelEdit[]
Defined in: server/api.d.ts:6554
A fresh array of surviving level edits in export order, excluding restored edits.
loaded
Section titled “loaded”
readonlyloaded:boolean
Defined in: server/api.d.ts:6539
Whether this export is registered. Remains true even if scripts destroy all of its contents.
readonlyname:string
Defined in: server/api.d.ts:6524
Unique case-sensitive resource name: the filename without .world.json, or the explicit config name. Empty after shutdown.
readonlypath:string
Defined in: server/api.d.ts:6529
Resolved absolute source file path, in UTF-8. Empty after shutdown.
patrolRoutes
Section titled “patrolRoutes”
readonlypatrolRoutes:PatrolRoute[]
Defined in: server/api.d.ts:6564
Surviving exported patrol definitions, in export order.
readonlyprops:Prop[]
Defined in: server/api.d.ts:6544
A fresh array of surviving props in export order. Changing the array does not change membership; the handles support normal Prop operations.
readonlystaticready:boolean
Defined in: server/api.d.ts:6569
True after every configured export has loaded successfully, even when the config list is empty. Check this before subscribing to worldResourcesReady when a script may start later.