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

Returns

One detached live assignment row, or an empty completed page when no player assignment exists.

Cost

One indexed live assignment lookup.

Fields

IDTypeUnitsRequiredDescription
actor_idstable-idnoneyesAssigned Actor identity.
job_idstable-idnoneyesAssigned job identity.
order_idstable-idnoneyesAssignment-order identity.
order_revisionrevisionnoneyesCurrent assignment-order revision.
stateenumerationnoneyesCurrent assignment state.

Errors

Examples

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

API history

Related symbols

Project references