query · world.actor

Actor cargo

Returns paginated detached resource quantities carried by one actor.

world.actor.cargo(filters?, cursor?, page_size?) -> query-page
Stable ID
world.actor.cargo
Owner
game.resource-economy
Authority
read_only
Timing
immediate
Availability
active-session
Side effects
none
Determinism
stable owner order at the current committed tick
Introduced
1.3.0

Usage

Query one actor_id to inspect the resources currently held in that Actor's carried inventory.

Parameters

Returns

Detached carried-resource rows in stable resource order. An empty completed page means the Actor carries nothing.

Cost

One Actor-container lookup and one bounded resource-definition visit per returned row.

Fields

IDTypeUnitsRequiredDescription
actor_idstable-idnoneyesActor identity.
container_idstable-idnoneyesActor-carried inventory container identity.
container_revisionunsigned-integernoneyesInventory owner revision.
quantityunsigned-integerresource-unitsyesQuantity carried.
resource_idstable-idnoneyesResource identity.
resource_keystringnoneyesAuthored resource key.

Errors

Examples

local cargo = world.query("world.actor.cargo", {page_size = 16, filters = {actor_id = selected_id}})

API history

Related symbols

Project references