query · world.work
Work targets
Returns bounded detached gathering and construction jobs valid for one Actor.
world.work.targets(filters?, cursor?, page_size?) -> query-page
- Stable ID
world.work.targets- Owner
- game.work-lifecycle, game.settlement-supply, game.construction, game.actor-runtime, and sim.world-runtime
- 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 for gathering and construction work that can currently be directed through the normal assignment path. Use the returned revisions unchanged when submitting command.work.assign or command.work.set-priority.
Parameters
- filters.actor_id: required stable Actor identity.
- cursor: optional continuation cursor.
- page_size: bounded target count.
Returns
Detached target rows with owner IDs, revisions, labels, type, Site, topology revision, and current player priority.
Cost
Bounded settlement-local Work, Supply, Construction, Actor, and World visits.
Fields
| ID | Type | Units | Required | Description |
|---|---|---|---|---|
actor_id | stable-id | none | yes | Actor that can receive the direction. |
actor_revision | revision | none | yes | Current Actor revision. |
detail | string | none | yes | Player-facing target explanation. |
job_id | stable-id | none | yes | Work job identity. |
job_revision | revision | none | yes | Current job revision. |
kind | enumeration | none | yes | Gathering or construction. |
label | string | none | yes | Player-facing target label. |
player_priority | unsigned-integer | basis-points | yes | Durable player-priority contribution. |
target_site_id | stable-id | none | yes | World Site for the work target. |
topology_revision | revision | none | yes | Current World topology revision. |
work_task_id | stable-id | none | yes | First Work task identity. |
work_task_revision | revision | none | yes | Current task revision. |
Errors
error.capability-unavailableerror.invalid-queryerror.query-budget-exhaustederror.query-contract-violation
Examples
local targets = world.query("world.work.targets", {page_size = 16, filters = {actor_id = selected_id}})
API history
- 1.5.0: Actionable settlement work query added for Phase 16D.