tweaks and wasm build for w3

This commit is contained in:
Llywelwyn 2023-07-25 17:08:11 +01:00
parent 1c956cdf58
commit 1b4d0c2c4b
9 changed files with 96 additions and 42 deletions

View file

@ -30,7 +30,7 @@ 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, 3) == 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()));
}
}

View file

@ -302,11 +302,11 @@ pub fn random_builder(new_depth: i32, rng: &mut rltk::RandomNumberGenerator, wid
}
*/
builder.with(DoorPlacement::new());
if rng.roll_dice(1, 20) == 1 {
builder.with(PrefabBuilder::sectional(prefab_builder::prefab_sections::UNDERGROUND_FORT));
}
builder.with(DoorPlacement::new());
builder.with(PrefabBuilder::vaults());
// Regardless of anything else, fill the edges back in with walls. We can't walk
// there anyway, and we don't want an open line of sight into the unmapped void.