diff --git a/src/map_builders.rs b/src/map_builders.rs index 1aaf747..cd704d6 100644 --- a/src/map_builders.rs +++ b/src/map_builders.rs @@ -180,33 +180,41 @@ fn random_initial_builder(rng: &mut RandomNumberGenerator) -> (Box BuilderChain { let mut builder = BuilderChain::new(new_depth); - let (random_starter, has_rooms) = random_initial_builder(rng); - builder.start_with(random_starter); + // let (random_starter, has_rooms) = random_initial_builder(rng); + // builder.start_with(random_starter); + // + // if has_rooms { + // builder + // .with(RoomBasedSpawner::new()) + // .with(RoomBasedStairs::new()) + // .with(RoomBasedStartingPosition::new()); + // } else { + // builder + // .with(AreaStartingPosition::new(XStart::Center, YStart::Center)) + // .with(CullUnreachable::new()) + // .with(VoronoiSpawning::new()) + // .with(DistantExit::new()); + // } + // + // if rng.roll_dice(1, 3) == 1 { + // builder.with(WaveformCollapseBuilder::new()); + // } + // + // if rng.roll_dice(1, 20) == 1 { + // builder.with(PrefabBuilder::sectional( + // prefab_builder::prefab_sections::UNDERGROUND_FORT, + // )); + // } + // + // builder.with(PrefabBuilder::vaults()); - if has_rooms { - builder - .with(RoomBasedSpawner::new()) - .with(RoomBasedStairs::new()) - .with(RoomBasedStartingPosition::new()); - } else { - builder - .with(AreaStartingPosition::new(XStart::Center, YStart::Center)) - .with(CullUnreachable::new()) - .with(VoronoiSpawning::new()) - .with(DistantExit::new()); - } - - if rng.roll_dice(1, 3) == 1 { - builder.with(WaveformCollapseBuilder::new()); - } - - if rng.roll_dice(1, 20) == 1 { - builder.with(PrefabBuilder::sectional( - prefab_builder::prefab_sections::UNDERGROUND_FORT, - )); - } - - builder.with(PrefabBuilder::vaults()); + builder + .start_with(BspDungeonBuilder::new()) + .with(RoomCornerRounder::new()) + .with(AreaStartingPosition::new(XStart::Center, YStart::Center)) + .with(CullUnreachable::new()) + .with(VoronoiSpawning::new()) + .with(DistantExit::new()); builder } diff --git a/src/map_builders/room_corner_rounding.rs b/src/map_builders/room_corner_rounding.rs index e48f248..3a21a9b 100644 --- a/src/map_builders/room_corner_rounding.rs +++ b/src/map_builders/room_corner_rounding.rs @@ -1,6 +1,7 @@ +use rltk::RandomNumberGenerator; + use crate::map_builders::{BuilderMap, MetaMapBuilder}; use crate::{Rect, TileType}; -use rltk::RandomNumberGenerator; pub struct RoomCornerRounder {} diff --git a/src/map_builders/room_exploder.rs b/src/map_builders/room_exploder.rs index 3db8a7f..43819ed 100644 --- a/src/map_builders/room_exploder.rs +++ b/src/map_builders/room_exploder.rs @@ -1,7 +1,8 @@ +use rltk::RandomNumberGenerator; + use crate::map_builders::common::{paint, Symmetry}; use crate::map_builders::{BuilderMap, MetaMapBuilder}; use crate::{Rect, TileType}; -use rltk::RandomNumberGenerator; pub struct RoomExploder {}