fun with layers, and inventory display refactor
This commit is contained in:
parent
50e3cb50bc
commit
b7b2061228
7 changed files with 122 additions and 129 deletions
|
|
@ -146,30 +146,11 @@ fn random_initial_builder(rng: &mut rltk::RandomNumberGenerator) -> (Box<dyn Ini
|
|||
|
||||
pub fn random_builder(new_depth: i32, rng: &mut rltk::RandomNumberGenerator) -> BuilderChain {
|
||||
let mut builder = BuilderChain::new(new_depth);
|
||||
let (random_starter, has_rooms) = random_initial_builder(rng);
|
||||
builder.start_with(random_starter);
|
||||
if has_rooms {
|
||||
builder.with(RoomBasedSpawner::new());
|
||||
builder.with(RoomBasedStairs::new());
|
||||
builder.with(RoomBasedStartingPosition::new());
|
||||
} else {
|
||||
builder.with(AreaStartingPosition::new(XStart::CENTRE, YStart::CENTRE));
|
||||
builder.with(CullUnreachable::new());
|
||||
builder.with(VoronoiSpawning::new());
|
||||
builder.with(DistantExit::new());
|
||||
}
|
||||
|
||||
if rng.roll_dice(1, 3) == 1 {
|
||||
builder.with(WaveFunctionCollapseBuilder::new());
|
||||
builder.with(CullUnreachable::new());
|
||||
builder.with(VoronoiSpawning::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(simple_map::SimpleMapBuilder::new());
|
||||
builder.with(DLABuilder::heavy_erosion());
|
||||
builder.with(AreaStartingPosition::new(XStart::CENTRE, YStart::CENTRE));
|
||||
builder.with(CullUnreachable::new());
|
||||
builder.with(VoronoiSpawning::new());
|
||||
builder.with(DistantExit::new());
|
||||
builder
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue