query · world.infrastructure
Infrastructure maintenance
Returns the latest Settlement-owned repair or extension choice with the bounded World wear evidence and physical material facts that informed it.
world.infrastructure.maintenance(filters?, cursor?, page_size?) -> query-page
- Stable ID
world.infrastructure.maintenance- Owner
- game.settlement
- 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 the latest bounded Settlement choice for infrastructure repair or extension. Each candidate row explains its World stage and condition, physical material and work requirement, eligibility, score, selection, and any matching regional-pressure or active-use wear evidence from the latest condition pass.
Parameters
- filters.infrastructure_id: optional positive infrastructure identity.
- cursor: optional continuation cursor.
- page_size: positive record limit capped by the host.
Returns
A detached page of Settlement-owned candidate evidence plus the autonomous maintenance cadence. The query grants no direct condition, inventory, or construction authority.
Cost
One Settlement lookup and a bounded candidate trace with indexed matching against the latest bounded World condition evidence.
Fields
| ID | Type | Units | Required | Description |
|---|---|---|---|---|
active_move_count | unsigned-integer-or-null | moves | no | Active paths using this infrastructure in the latest World pass. |
available_material | unsigned-integer-or-null | resource-units | no | Physical material available in the selected stockpile. |
candidate_detail | string-or-null | none | no | Candidate-specific explanation. |
condition | unsigned-integer-or-null | basis-points | no | Condition at evaluation. |
condition_loss | unsigned-integer-or-null | basis-points | no | Condition lost during the latest World pass. |
decision_detail | string | none | yes | Settlement-level explanation. |
decision_status | enumeration | none | yes | Latest Settlement decision status. |
decision_tick | unsigned-integer | ticks | yes | Latest Settlement evaluation tick. |
eligible | boolean-or-null | none | no | Whether all current owners permit the work. |
environmental_pressure | signed-integer-or-null | pressure-units | no | Latest regional pressure observed by World for this infrastructure. |
infrastructure_id | stable-id-or-null | none | no | Evaluated infrastructure identity, when a candidate exists. |
next_maintenance_tick | unsigned-integer | ticks | yes | Next autonomous condition and choice evaluation tick. |
required_material | unsigned-integer-or-null | resource-units | no | Physical material required by the evaluated work. |
required_work | unsigned-integer-or-null | work-units | no | Combined clearing, laying, and finishing work. |
selected | boolean-or-null | none | no | Whether Settlement selected this candidate. |
stage | enumeration-or-null | none | no | World lifecycle stage at evaluation. |
total_score | signed-integer-or-null | none | no | Sum of retained condition, travel, field, and material contributions. |
work_kind | enumeration-or-null | none | no | Repair or extension. |
Errors
error.capability-unavailableerror.invalid-queryerror.query-budget-exhaustederror.query-contract-violation
Examples
local result = world.query("world.infrastructure.maintenance", {page_size = 8})
for _, item in ipairs(result.records) do
ui.row(tostring(item.infrastructure_id), item.candidate_detail)
end
API history
- 1.19.0: Environment and use wear plus Settlement repair and extension evidence added for Village Life M4.
Related symbols
world.infrastructure.localworld.infrastructure.constructioncommand.infrastructure.request-workcommand.work.assigncommand.work.set-priorityworld.query