Share door clearance and support rules between voxel consumers

This commit is contained in:
faumaray committed 2026-12-02 23:32:09 +03:00
1 parent 6279a60bf7
commit 6d1123e172
2 files changed
+5 -1

No files matched your search

@@ -47,8 +47,10 @@ struct VoxelAddress {
[[nodiscard]] std::optional<VoxelPosition> join_voxel(ChunkCoordinate chunk, LocalVoxel local) noexcept;
[[nodiscard]] std::optional<std::size_t> 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;