query · world.infrastructure

Infrastructure construction

Returns bounded Construction-owned infrastructure project, worker, Work identity, progress, resource-owner, and failure facts.

world.infrastructure.construction(filters?, cursor?, page_size?) -> query-page
Stable ID
world.infrastructure.construction
Owner
game.infrastructure-construction
Authority
read_only
Timing
immediate
Availability
active-session
Side effects
none
Determinism
stable owner order at the current committed tick
Introduced
1.19.0

Usage

Read retained road, fence, or gate construction progress through a bounded detached query. Use the reported project revision for cancellation and the reported Work job identity with normal priority or assignment commands; do not retain a row after its callback.

Parameters

Returns

A detached page containing build-or-repair purpose, project and resume stages, the World stage and condition restored on cancellation, failure cause, current worker, Work demand and job identities, source and site Resource containers, work cell, stage progress and requirements, revision, and causal ticks.

Cost

Bounded by page size and owner-visit budgets. Construction resumes from the stable infrastructure identity cursor.

Fields

IDTypeUnitsRequiredDescription
clearing_workunsigned-integerwork-unitsyesRequired clearing work.
completed_stage_workunsigned-integerwork-unitsyesRetained work completed in the current stage.
created_at_tickunsigned-integerticksyesProject creation tick.
demand_idstable-idnoneyesWork demand identity.
failure_causeenumerationnoneyesRetained terminal failure cause.
finishing_workunsigned-integerwork-unitsyesRequired finishing work.
infrastructure_idstable-idnoneyesWorld infrastructure identity.
job_idstable-idnoneyesWork job identity.
laying_workunsigned-integerwork-unitsyesRequired laying work.
material_source_container_idstable-idnoneyesResource stockpile container supplying the project.
purposeenumerationnoneyesBuild or repair.
restored_world_conditionunsigned-integerbasis-pointsyesWorld condition restored if the project is cancelled.
restored_world_stageenumerationnoneyesWorld stage restored if the project is cancelled.
resume_stageenumerationnoneyesStage retained across a worker handoff.
revisionrevisionnoneyesConstruction project revision.
site_inventory_container_idstable-idnoneyesResource construction-site container.
stageenumerationnoneyesCurrent infrastructure-work stage.
updated_at_tickunsigned-integerticksyesLatest project mutation tick.
work_cell_xsigned-integergrid-cellsyesInfrastructure work cell X.
work_cell_ysigned-integergrid-cellsyesInfrastructure work cell Y.
worker_idstable-id-or-nullnonenoCurrent resident worker.

Errors

Examples

local result = world.query("world.infrastructure.construction", {page_size = 8})
if result.status == "completed" then
    for _, project in ipairs(result.records) do
        ui.row("Infrastructure " .. tostring(project.infrastructure_id), project.stage)
    end
end

API history

Related symbols

Project references