query · world.settlement
Settlement spatial districts
Returns descriptive districts inferred by Settlement from current physical anchor proximity and services. District rows are read-only descriptions, not land authority.
world.settlement.spatial-districts(filters?, cursor?, page_size?) -> query-page
- Stable ID
world.settlement.spatial-districts- 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 Settlement's latest descriptive grouping of current physical building and land anchors. Supply settlement_id. District descriptions do not claim land, set zoning, or authorize construction.
Parameters
- filters.settlement_id: required stable Settlement identity.
- cursor: optional continuation cursor over stable district identities.
- page_size: bounded district-row limit.
Returns
Detached district rows with portfolio tick, stable key, descriptive kind, canonical anchor-cell list, distinct service list, Building and land-area counts, and direct derivation explanation. Residential-only districts may have an empty service list.
Cost
One exact Settlement lookup plus one bounded traversal of the latest retained district descriptions. Runtime derivation uses the authored district visit budget and proximity radius.
Fields
| ID | Type | Units | Required | Description |
|---|---|---|---|---|
anchor_cells | string | none | yes | Stable comma-separated anchor-cell list. |
anchor_count | unsigned-integer | none | yes | Current physical anchors in the district. |
building_count | unsigned-integer | none | yes | Current Building anchors. |
detail | string | none | yes | Direct district derivation explanation. |
district_key | string | none | yes | Stable descriptive district identity. |
evaluation_tick | unsigned-integer | fixed-ticks | yes | Portfolio tick that described the district. |
kind | enumeration | none | yes | Residential, civic, agrarian, craft, or mixed description. |
land_area_count | unsigned-integer | none | yes | Current land-area anchors. |
service_count | unsigned-integer | none | yes | Distinct services present. |
services | string | none | yes | Stable comma-separated service list. |
settlement_id | stable-id | none | yes | Settlement identity. |
settlement_revision | revision | none | yes | Current Settlement owner revision. |
Errors
error.capability-unavailableerror.invalid-queryerror.query-budget-exhaustederror.query-contract-violation
Examples
local districts = world.query("world.settlement.spatial-districts", {filters = {settlement_id = 1}, page_size = 16})
for _, district in ipairs(districts.records) do
ui.text(district.kind, district.anchor_cells)
end
API history
- 1.19.0: Read-only physical-anchor district descriptions added for Phase 19Q6E.
Related symbols
world.settlement.spatial-optionsworld.settlement.spatial-executionsworld.infrastructure.localworld.land.areasworld.query