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