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:
@@ -80,8 +80,26 @@ fn drain_generation_completions(
|
||||
GenCompletion::Failed { item, reason } => {
|
||||
tracing::warn!(?item, %reason, "background generation work item failed");
|
||||
}
|
||||
// Produced once the later layers land (#957 / #959); no consumer yet.
|
||||
GenCompletion::SkeletonGenerated { .. } | GenCompletion::ChunkFilled { .. } => {}
|
||||
// Insert district world state into the matching body's cache entry (D-230).
|
||||
GenCompletion::SkeletonGenerated {
|
||||
city_id,
|
||||
body_id,
|
||||
state,
|
||||
} => {
|
||||
if !body_id.is_empty() {
|
||||
if let Some(body_state) = cache.peek_mut(&body_id) {
|
||||
body_state.districts.insert(city_id, state);
|
||||
} else {
|
||||
tracing::warn!(
|
||||
city_id,
|
||||
body_id,
|
||||
"SkeletonGenerated: body not in cache — district state dropped"
|
||||
);
|
||||
}
|
||||
}
|
||||
// body_id empty = stub result from GenerateSkeleton stub; silently ignore.
|
||||
}
|
||||
GenCompletion::ChunkFilled { .. } => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user