diff --git a/docs/agent-workflow/tasks/S02-01.md b/docs/agent-workflow/tasks/S02-01.md index 18f2226..fe6654c 100644 --- a/docs/agent-workflow/tasks/S02-01.md +++ b/docs/agent-workflow/tasks/S02-01.md @@ -46,3 +46,5 @@ User authorizes all milestone/system coding, Gitea PRs and true Void gaps. Root ## 14. Return format Return S02-01 READY or PARTIAL, early frozen API and relevant coordinate/frame assumptions, controlled failure cases, working paths, actual verification counts/measurements/limits and remaining integration seams. + +The M02 door uses two stable non-generated cell kinds, `MaterialId::DoorClosed` and `MaterialId::DoorOpen`, appended after Air, Soil and Stone. A closed door blocks body clearance; an open door and air permit clearance. Only Soil and Stone provide standing support. Publish NEW `voxel_blocks_passage(MaterialId)` and `voxel_provides_support(MaterialId)` queries for the navigation and presentation owners. Both halves of a door can be changed in the same checked edit batch. Invalid materials remain rejected. The generator produces natural materials only, and the gameplay owner controls who may operate or mine a door. Add tests for these shared semantics, both updating over a page boundary if applicable, and tell root when the adjusted header is frozen. This prevents a second source of door geometry, occupancy and invalidation in navigation. diff --git a/engine/include/settlement/core/voxel_region.hpp b/engine/include/settlement/core/voxel_region.hpp index debdbfd..73bddfb 100644 --- a/engine/include/settlement/core/voxel_region.hpp +++ b/engine/include/settlement/core/voxel_region.hpp @@ -47,8 +47,10 @@ struct VoxelAddress { [[nodiscard]] std::optional join_voxel(ChunkCoordinate chunk, LocalVoxel local) noexcept; [[nodiscard]] std::optional voxel_index(LocalVoxel local) noexcept; -enum class MaterialId : std::uint8_t { Air = 0, Soil = 1, Stone = 2 }; +enum class MaterialId : std::uint8_t { Air = 0, Soil = 1, Stone = 2, DoorClosed = 3, DoorOpen = 4 }; [[nodiscard]] bool valid_voxel_material(MaterialId material) noexcept; +[[nodiscard]] bool voxel_blocks_passage(MaterialId material) noexcept; +[[nodiscard]] bool voxel_provides_support(MaterialId material) noexcept; struct VoxelRegionDescriptor { RegionId id = 0;