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
- filters.actor_id: required stable Actor identity.
- cursor: optional continuation cursor.
- page_size: bounded resource-row limit.
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
| ID | Type | Units | Required | Description |
|---|---|---|---|---|
actor_id | stable-id | none | yes | Actor identity. |
container_id | stable-id | none | yes | Actor-carried inventory container identity. |
container_revision | unsigned-integer | none | yes | Inventory owner revision. |
quantity | unsigned-integer | resource-units | yes | Quantity carried. |
resource_id | stable-id | none | yes | Resource identity. |
resource_key | string | none | yes | Authored resource key. |
Errors
error.capability-unavailableerror.invalid-queryerror.query-budget-exhaustederror.query-contract-violation
Examples
local cargo = world.query("world.actor.cargo", {page_size = 16, filters = {actor_id = selected_id}})
API history
- 1.3.0: Detached Actor cargo query added for Phase 16D.