Don't chose room kinds with dynamic_rng

This commit is contained in:
juliancoffee 2021-08-05 11:43:04 +03:00
parent 2bc4f364bf
commit 771df2f0f1

View File

@ -498,7 +498,8 @@ impl Floor {
ctx.rng.gen_range(0..floor_sz + 1 - room_sz)
});
let area = Rect::from((pos, Extent2::from(sz)));
let area_border = Rect::from((pos - 1, Extent2::from(sz) + 2)); // The room, but with some personal space
// The room, but with some personal space
let area_border = Rect::from((pos - 1, Extent2::from(sz) + 2));
// Ensure no overlap
if self
@ -514,9 +515,8 @@ impl Floor {
Some(area) => area,
None => return,
};
let mut dynamic_rng = rand::thread_rng();
match dynamic_rng.gen_range(0..5) {
match ctx.rng.gen_range(0..5) {
// Miniboss room
0 => self.create_room(Room {
seed: ctx.rng.gen(),