query · world.work
Current work assignment
Returns the latest live player assignment retained for one Actor.
world.work.assignment(filters?, cursor?, page_size?) -> query-page
- Stable ID
world.work.assignment- Owner
- game.work-lifecycle
- Authority
- read_only
- Timing
- immediate
- Availability
- active-session
- Side effects
- none
- Determinism
- stable owner order at the current committed tick
- Introduced
- 1.5.0
Usage
Query one actor_id to read that Actor's latest live player assignment order and current revision.
Parameters
- filters.actor_id: required stable Actor identity.
- cursor: optional continuation cursor.
- page_size: bounded record limit.
Returns
One detached live assignment row, or an empty completed page when no player assignment exists.
Cost
One indexed live assignment lookup.
Fields
| ID | Type | Units | Required | Description |
|---|---|---|---|---|
actor_id | stable-id | none | yes | Assigned Actor identity. |
job_id | stable-id | none | yes | Assigned job identity. |
order_id | stable-id | none | yes | Assignment-order identity. |
order_revision | revision | none | yes | Current assignment-order revision. |
state | enumeration | none | yes | Current assignment state. |
Errors
error.capability-unavailableerror.invalid-queryerror.query-budget-exhaustederror.query-contract-violation
Examples
local assignment = world.query("world.work.assignment", {page_size = 1, filters = {actor_id = selected_id}})
API history
- 1.5.0: Live player assignment query added for Phase 16D.