feat(simulation): wire region climate layer into the cascade + proxy (T-1113, D-243)
CascadeLayer::Region appended per the enum's append-only Ord rule (depends only on seed/body_params/heightmap dims — documented); BodyWorldState.regions BTreeMap per the districts precedent; RegionGridLayer dense row-major all-integer encoding (season/weather repr(u8) discriminants, mean_temp deci-degC i16 with i16::MIN airless sentinel, moisture_q u8); build_region_grid mirrors build_district_grid; protocol.gd region_grid passthrough (visual overlay deliberately out of scope); wire fixtures regenerated via make fixtures. atlas:: suite 507 green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -774,11 +774,12 @@ static func decode_atlas_layer_response(bytes: PackedByteArray) -> Variant:
|
||||
## road_graph/settlements (T-960): passthrough fields for the L2 road/rail
|
||||
## graph and L3 settlement placements, mirroring the district_grid precedent
|
||||
## (T-1046) — raw decoded maps/arrays, no further client-side reshaping.
|
||||
## Key names "road_graph"/"settlements" are the CONFIRMED wire contract —
|
||||
## identical to server/src/atlas/layer_proxy.rs AtlasLayerResponse's field
|
||||
## names (pinned 2026-07-14; round-tripped by test_atlas_overlays.gd and the
|
||||
## server's msgpack round-trip tests). This remains the one client-side spot
|
||||
## to touch if the contract ever changes.
|
||||
## region_grid (T-1113): the region climate grid, same passthrough pattern.
|
||||
## Key names "road_graph"/"settlements"/"region_grid" are the CONFIRMED wire
|
||||
## contract — identical to server/src/atlas/layer_proxy.rs AtlasLayerResponse's
|
||||
## field names (pinned 2026-07-14; round-tripped by test_atlas_overlays.gd and
|
||||
## the server's msgpack round-trip tests). This remains the one client-side
|
||||
## spot to touch if the contract ever changes.
|
||||
static func atlas_response_from_raw(raw: Variant) -> Variant:
|
||||
if not raw is Dictionary or not raw.has("status"):
|
||||
return null
|
||||
@@ -798,6 +799,7 @@ static func atlas_response_from_raw(raw: Variant) -> Variant:
|
||||
"district_grid": raw.get("district_grid"),
|
||||
"road_graph": raw.get("road_graph"),
|
||||
"settlements": raw.get("settlements"),
|
||||
"region_grid": raw.get("region_grid"),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user