mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'juliancoffee/deterministic_dungeons' into 'master'
Don't chose room kinds with dynamic_rng See merge request veloren/veloren!2750
This commit is contained in:
commit
cde1283e04
@ -498,7 +498,8 @@ impl Floor {
|
|||||||
ctx.rng.gen_range(0..floor_sz + 1 - room_sz)
|
ctx.rng.gen_range(0..floor_sz + 1 - room_sz)
|
||||||
});
|
});
|
||||||
let area = Rect::from((pos, Extent2::from(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
|
// Ensure no overlap
|
||||||
if self
|
if self
|
||||||
@ -514,9 +515,8 @@ impl Floor {
|
|||||||
Some(area) => area,
|
Some(area) => area,
|
||||||
None => return,
|
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
|
// Miniboss room
|
||||||
0 => self.create_room(Room {
|
0 => self.create_room(Room {
|
||||||
seed: ctx.rng.gen(),
|
seed: ctx.rng.gen(),
|
||||||
|
Loading…
Reference in New Issue
Block a user