Nuke hallway tile type
This commit is contained in:
parent
257f43f02a
commit
98cea211fc
|
@ -35,7 +35,6 @@ pub struct LevelExits {
|
|||
pub enum DungeonTile {
|
||||
Floor,
|
||||
Wall,
|
||||
Hallway,
|
||||
Upstair,
|
||||
Downstair,
|
||||
}
|
||||
|
@ -46,7 +45,6 @@ impl DungeonTile {
|
|||
pub fn is_floor(&self) -> bool {
|
||||
match self {
|
||||
DungeonTile::Wall => false,
|
||||
DungeonTile::Hallway => false,
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +52,7 @@ impl DungeonTile {
|
|||
/// Whether this tile can be traveled through by normal
|
||||
/// creatures.
|
||||
pub fn is_navigable(&self) -> bool {
|
||||
self.is_floor() || self == &DungeonTile::Hallway
|
||||
self.is_floor()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,7 +158,6 @@ impl DungeonLevel {
|
|||
' '
|
||||
}
|
||||
}
|
||||
DungeonTile::Hallway => '#',
|
||||
DungeonTile::Upstair => '<',
|
||||
DungeonTile::Downstair => '>',
|
||||
}
|
||||
|
|
|
@ -243,7 +243,7 @@ fn add_hallways(grid: &mut Grid<DungeonTile>, rooms: &[RoomBounds], rng: &mut im
|
|||
|
||||
for (x, y) in path {
|
||||
if grid[y][x] == DungeonTile::Wall {
|
||||
grid[y][x] = DungeonTile::Hallway;
|
||||
grid[y][x] = DungeonTile::Floor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue