made the switch to using bracket-lib directly, instead of rltk wrapper
this should solve the build issues; it makes using the non-crashing github build a lot easier, because it lets the explicit rltk dependency be removed.
This commit is contained in:
parent
455b8f2d80
commit
85efe13dc5
93 changed files with 1528 additions and 770 deletions
|
|
@ -1,11 +1,11 @@
|
|||
use super::{ BuilderMap, MetaMapBuilder, TileType };
|
||||
use rltk::RandomNumberGenerator;
|
||||
use bracket_lib::prelude::*;
|
||||
|
||||
pub struct DoorPlacement {}
|
||||
|
||||
impl MetaMapBuilder for DoorPlacement {
|
||||
#[allow(dead_code)]
|
||||
fn build_map(&mut self, rng: &mut rltk::RandomNumberGenerator, build_data: &mut BuilderMap) {
|
||||
fn build_map(&mut self, rng: &mut RandomNumberGenerator, build_data: &mut BuilderMap) {
|
||||
self.doors(rng, build_data);
|
||||
}
|
||||
}
|
||||
|
|
@ -30,7 +30,11 @@ impl DoorPlacement {
|
|||
// There are no corridors - scan for possible places
|
||||
let tiles = build_data.map.tiles.clone();
|
||||
for (i, tile) in tiles.iter().enumerate() {
|
||||
if *tile == TileType::Floor && self.door_possible(build_data, i) && rng.roll_dice(1, 6) == 1 {
|
||||
if
|
||||
*tile == TileType::Floor &&
|
||||
self.door_possible(build_data, i) &&
|
||||
rng.roll_dice(1, 6) == 1
|
||||
{
|
||||
build_data.spawn_list.push((i, "door".to_string()));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue