Update random_builder function with temporary setup
This commit is contained in:
parent
099f373ee8
commit
9ef557d938
@ -180,33 +180,41 @@ fn random_initial_builder(rng: &mut RandomNumberGenerator) -> (Box<dyn InitialMa
|
|||||||
|
|
||||||
pub fn random_builder(new_depth: i32, rng: &mut RandomNumberGenerator) -> BuilderChain {
|
pub fn random_builder(new_depth: i32, rng: &mut RandomNumberGenerator) -> BuilderChain {
|
||||||
let mut builder = BuilderChain::new(new_depth);
|
let mut builder = BuilderChain::new(new_depth);
|
||||||
let (random_starter, has_rooms) = random_initial_builder(rng);
|
// let (random_starter, has_rooms) = random_initial_builder(rng);
|
||||||
builder.start_with(random_starter);
|
// 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
|
builder
|
||||||
|
.start_with(BspDungeonBuilder::new())
|
||||||
|
.with(RoomCornerRounder::new())
|
||||||
.with(AreaStartingPosition::new(XStart::Center, YStart::Center))
|
.with(AreaStartingPosition::new(XStart::Center, YStart::Center))
|
||||||
.with(CullUnreachable::new())
|
.with(CullUnreachable::new())
|
||||||
.with(VoronoiSpawning::new())
|
.with(VoronoiSpawning::new())
|
||||||
.with(DistantExit::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
|
builder
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
use rltk::RandomNumberGenerator;
|
||||||
|
|
||||||
use crate::map_builders::{BuilderMap, MetaMapBuilder};
|
use crate::map_builders::{BuilderMap, MetaMapBuilder};
|
||||||
use crate::{Rect, TileType};
|
use crate::{Rect, TileType};
|
||||||
use rltk::RandomNumberGenerator;
|
|
||||||
|
|
||||||
pub struct RoomCornerRounder {}
|
pub struct RoomCornerRounder {}
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
|
use rltk::RandomNumberGenerator;
|
||||||
|
|
||||||
use crate::map_builders::common::{paint, Symmetry};
|
use crate::map_builders::common::{paint, Symmetry};
|
||||||
use crate::map_builders::{BuilderMap, MetaMapBuilder};
|
use crate::map_builders::{BuilderMap, MetaMapBuilder};
|
||||||
use crate::{Rect, TileType};
|
use crate::{Rect, TileType};
|
||||||
use rltk::RandomNumberGenerator;
|
|
||||||
|
|
||||||
pub struct RoomExploder {}
|
pub struct RoomExploder {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user