feat(simulation): foundation shared types + struct plumbing (#1006)

Define the type-definition layer the Phase-4 fill-seam tickets depend on
(D-229/D-230/D-231/D-232/D-233), compiling with stubs/defaults; behavior
logic lands in #982-985/#998.

- New types in generator.rs: BuildingPropertyTag, FloorExtent +
  FloorHeightProfile (floor_at_voxel_z/voxel_range_for_floor, resolves
  Q-104), BuildingEntryClass, ConstructionEra, ZoneTypeId, MorphologyZone,
  BulkClass(5), ProductionUbiquity, DoorSpec, InteriorDescriptor,
  DistrictWorldState.
- Rename spatial AccessTier -> ZoneAccessTier to free the name for the new
  per-building BuildingEntryClass.
- CityGenerationContext: +morphology_zone, +trait_selection,
  +dominant_bulk_class, +dominant_production_ubiquity.
- BodyWorldState: +districts (DistrictWorldState w/ block_tags).
- GenCompletion::SkeletonGenerated carries body_id + DistrictWorldState;
  plugin handler inserts into BodyWorldState.districts.
- Add smallvec as a direct dep (DoorSpec list stays Vec for now, TODO).

cargo check --all-targets / clippy clean; 1259 lib tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-30 16:07:33 +02:00
co-authored by Claude Opus 4.8
parent 6e7f6356f0
commit 46b8688fa3
10 changed files with 535 additions and 12 deletions
+13 -1
View File
@@ -31,6 +31,7 @@ use crate::atlas::body_world_state::BodyWorldState;
use crate::atlas::cascade::{run_cascade_from_heightmap, CascadeLayer};
use crate::atlas::heightmap::{load_heightmap_png, GRID_H, GRID_W};
use crate::seed::SeedChain;
use crate::simulation::generator::DistrictWorldState;
// ---------------------------------------------------------------------------
// Priority
@@ -99,6 +100,11 @@ pub enum GenCompletion {
},
SkeletonGenerated {
city_id: u64,
/// The body this skeleton belongs to — used to route state into
/// `BodyWorldState.districts` (D-230).
body_id: String,
/// District-level world state (block tags) produced by the plan phase (D-230).
state: DistrictWorldState,
},
ChunkFilled {
district_id: u64,
@@ -336,7 +342,13 @@ fn run_work_item(item: &GenWorkItem) -> GenCompletion {
},
},
GenWorkItem::GenerateSkeleton { city_id } => {
GenCompletion::SkeletonGenerated { city_id: *city_id }
// Stub: real skeleton generation (#957) will populate `body_id` from
// the CityGenerationContext and `state` from the plan phase (D-230).
GenCompletion::SkeletonGenerated {
city_id: *city_id,
body_id: String::new(),
state: DistrictWorldState::default(),
}
}
GenWorkItem::FillChunk {
district_id,