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

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

IDTypeUnitsRequiredDescription
actor_idstable-idnoneyesActor that can receive the direction.
actor_revisionrevisionnoneyesCurrent Actor revision.
detailstringnoneyesPlayer-facing target explanation.
job_idstable-idnoneyesWork job identity.
job_revisionrevisionnoneyesCurrent job revision.
kindenumerationnoneyesGathering or construction.
labelstringnoneyesPlayer-facing target label.
player_priorityunsigned-integerbasis-pointsyesDurable player-priority contribution.
target_site_idstable-idnoneyesWorld Site for the work target.
topology_revisionrevisionnoneyesCurrent World topology revision.
work_task_idstable-idnoneyesFirst Work task identity.
work_task_revisionrevisionnoneyesCurrent task revision.

Errors

Examples

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

API history

Related symbols

Project references