2022-01-28 12:28:42 -05:00
|
|
|
use super::prefab_builder::prefab_sections::UNDERGROUND_FORT;
|
|
|
|
use super::{
|
|
|
|
AreaEndingPosition, AreaStartingPosition, BuilderChain, CellularAutomataBuilder,
|
|
|
|
CullUnreachable, PrefabBuilder, VoronoiSpawning, WaveformCollapseBuilder, XEnd, XStart, YEnd,
|
|
|
|
YStart,
|
|
|
|
};
|
|
|
|
|
|
|
|
pub fn mushroom_entrance(
|
|
|
|
new_depth: i32,
|
|
|
|
_rng: &mut ::rltk::RandomNumberGenerator,
|
|
|
|
width: i32,
|
|
|
|
height: i32,
|
|
|
|
) -> BuilderChain {
|
|
|
|
let mut chain = BuilderChain::new(new_depth, width, height, "Into the Mushroom Grove");
|
|
|
|
chain
|
|
|
|
.start_with(CellularAutomataBuilder::new())
|
|
|
|
.with(WaveformCollapseBuilder::new())
|
|
|
|
.with(AreaStartingPosition::new(XStart::Center, YStart::Center))
|
|
|
|
.with(CullUnreachable::new())
|
|
|
|
.with(AreaStartingPosition::new(XStart::Right, YStart::Center))
|
|
|
|
.with(AreaEndingPosition::new(XEnd::Left, YEnd::Center))
|
|
|
|
.with(VoronoiSpawning::new())
|
|
|
|
.with(PrefabBuilder::sectional(UNDERGROUND_FORT));
|
|
|
|
|
|
|
|
chain
|
|
|
|
}
|
2022-01-28 14:08:22 -05:00
|
|
|
|
|
|
|
pub fn mushroom_builder(
|
|
|
|
new_depth: i32,
|
|
|
|
_rng: &mut ::rltk::RandomNumberGenerator,
|
|
|
|
width: i32,
|
|
|
|
height: i32,
|
|
|
|
) -> BuilderChain {
|
|
|
|
let mut chain = BuilderChain::new(new_depth, width, height, "Into the Mushroom Grove");
|
|
|
|
chain
|
|
|
|
.start_with(CellularAutomataBuilder::new())
|
|
|
|
.with(WaveformCollapseBuilder::new())
|
|
|
|
.with(AreaStartingPosition::new(XStart::Center, YStart::Center))
|
|
|
|
.with(CullUnreachable::new())
|
|
|
|
.with(AreaStartingPosition::new(XStart::Right, YStart::Center))
|
|
|
|
.with(AreaEndingPosition::new(XEnd::Left, YEnd::Center))
|
|
|
|
.with(VoronoiSpawning::new());
|
|
|
|
|
|
|
|
chain
|
|
|
|
}
|