feat(simulation): Layer-1 water bearing + D-234 waterfront rule (#957)
Close the last D-234 piece — terrain water-direction extraction wired through to founding orientation and the quarter waterfront rule: - Layer 1: TerrainAnalysis::water_bearing — 8-octant integer bearing toward the nearest water from the water_dist gradient (D-010, no atan2). Stored on GeographicAttractor.water_bearing (360 = none). - #956 founding orientation: coastal/river settlements now get a real water-facing bearing (the anchoring attractor's), replacing the 0 stub. - #957 waterfront rule (D-234b): the water-facing quarter edge (from the settlement's Coastal founding orientation) drops its block setback to 0 so buildings present flush to the quay (dock-orthogonal). Typed Edge + coastal_edge + per-block gating. Golden + atlas_response fixture rebaked (additive water_bearing field only). 8 new tests. All integer-deterministic (D-010). Pending: the waterfront rule reads context.founding_orientation, which city_context_reader still stubs to Cardinal — real per-settlement orientation reaches quarter generation once the Layer-3 placement -> Layer-4 GenerateSkeleton dispatch is wired (the remaining cross-layer integration). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -529,6 +529,12 @@ pub struct GeographicAttractor {
|
||||
/// `sub_biome` + local slope; penalizes marginal cities in the matching
|
||||
/// pipeline (D-211). Integer for D-010 determinism (#955). (D-210)
|
||||
pub terrain_modification_cost: i32,
|
||||
/// Compass bearing (degrees, quantized to 8 octants: 0=N,45=NE…315=NW)
|
||||
/// toward the nearest water from this position, or 360 = "no water nearby".
|
||||
/// Layer-1 terrain extraction feeding D-213 founding orientation (coastal
|
||||
/// facing / river bearing) and the D-234 waterfront rule. Integer 8-octant
|
||||
/// keeps it D-010-deterministic (no `atan2`).
|
||||
pub water_bearing: u16,
|
||||
}
|
||||
|
||||
/// Compatibility weights between economic roles and attractor types.
|
||||
|
||||
Reference in New Issue
Block a user