Add the Dark elf city
This commit is contained in:
parent
b6e05b157a
commit
5731b346cd
@ -6,6 +6,7 @@ mod bsp_interior;
|
|||||||
mod cellular_automata;
|
mod cellular_automata;
|
||||||
mod common;
|
mod common;
|
||||||
mod cull_unreachable;
|
mod cull_unreachable;
|
||||||
|
mod dark_elves;
|
||||||
mod distant_exit;
|
mod distant_exit;
|
||||||
mod dla;
|
mod dla;
|
||||||
mod door_placement;
|
mod door_placement;
|
||||||
@ -42,6 +43,7 @@ use bsp_dungeon::BspDungeonBuilder;
|
|||||||
use bsp_interior::BspInteriorBuilder;
|
use bsp_interior::BspInteriorBuilder;
|
||||||
use cellular_automata::CellularAutomataBuilder;
|
use cellular_automata::CellularAutomataBuilder;
|
||||||
use cull_unreachable::CullUnreachable;
|
use cull_unreachable::CullUnreachable;
|
||||||
|
use dark_elves::*;
|
||||||
use distant_exit::DistantExit;
|
use distant_exit::DistantExit;
|
||||||
use dla::DLABuilder;
|
use dla::DLABuilder;
|
||||||
use door_placement::DoorPlacement;
|
use door_placement::DoorPlacement;
|
||||||
@ -354,6 +356,7 @@ pub fn level_builder(new_depth: i32, width: i32, height: i32) -> BuilderChain {
|
|||||||
7 => mushroom_entrance(new_depth, width, height),
|
7 => mushroom_entrance(new_depth, width, height),
|
||||||
8 => mushroom_builder(new_depth, width, height),
|
8 => mushroom_builder(new_depth, width, height),
|
||||||
9 => mushroom_exit(new_depth, width, height),
|
9 => mushroom_exit(new_depth, width, height),
|
||||||
|
10 => dark_elf_city(new_depth, width, height),
|
||||||
_ => random_builder(new_depth, width, height),
|
_ => random_builder(new_depth, width, height),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
17
src/map_builders/dark_elves.rs
Normal file
17
src/map_builders/dark_elves.rs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
use super::{
|
||||||
|
AreaEndingPosition, AreaStartingPosition, BspInteriorBuilder, BuilderChain, CullUnreachable,
|
||||||
|
VoronoiSpawning, XEnd, XStart, YEnd, YStart,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub fn dark_elf_city(new_depth: i32, width: i32, height: i32) -> BuilderChain {
|
||||||
|
let mut chain = BuilderChain::new(new_depth, width, height, "Dark Elven City");
|
||||||
|
chain
|
||||||
|
.start_with(BspInteriorBuilder::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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user