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:
@@ -15,7 +15,9 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::atlas::attractor_matching::CityPlacement;
|
||||
use crate::atlas::district_profile::{DistrictPos, DistrictProfile};
|
||||
use crate::atlas::region_profile::RegionProfile;
|
||||
use crate::atlas::road_graph::RoadGraph;
|
||||
use crate::atlas::scale::RegionPos;
|
||||
use crate::simulation::generator::{
|
||||
GeographicAttractor, QuarterId, QuarterWorldState, TerritorialStatus,
|
||||
};
|
||||
@@ -100,6 +102,15 @@ pub struct BodyWorldState {
|
||||
/// `BTreeMap` keyed by `DistrictPos` for D-010 determinism.
|
||||
/// Empty until the DistrictProfile layer has run.
|
||||
pub districts: BTreeMap<DistrictPos, DistrictProfile>,
|
||||
/// Per-region (~205 km) climate context — season/weather/temperature
|
||||
/// baseline cells (D-243 §3, T-1113).
|
||||
///
|
||||
/// Populated by the background cascade's Region layer; the covering grid
|
||||
/// only (no blend-padding ring — see `cascade::LayerRegionOutput`).
|
||||
/// `BTreeMap` keyed by `RegionPos` for D-010 determinism. Empty until the
|
||||
/// Region layer has run. Footprint is trivial (~195×98 cells at the D-243
|
||||
/// true-scale ceiling; a handful on today's working grids).
|
||||
pub regions: BTreeMap<RegionPos, RegionProfile>,
|
||||
/// Last sim tick this entry was read. Used for LRU eviction.
|
||||
pub last_accessed: SimTick,
|
||||
}
|
||||
@@ -224,6 +235,7 @@ mod tests {
|
||||
road_graph: RoadGraph::default(),
|
||||
quarters: BTreeMap::new(),
|
||||
districts: BTreeMap::new(),
|
||||
regions: BTreeMap::new(),
|
||||
last_accessed: tick,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user