1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-21 18:11:11 +00:00

Dungeons: Make multiple large rooms possible (#8678)

Re-add the random size range for large rooms.
Remove 'first_room_large' bool.
Add 'large_room_chance' parameter that can disable large rooms,
specify 1 large room, or specify a chance for large rooms.
If 1 or a chance is specified, the first generated room is large,
to take advantage of the intersection checks that are done for the
1st room only.
This commit is contained in:
Paramat 2019-07-16 20:39:58 +01:00 committed by GitHub
parent 47492386ec
commit 458f617575
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 51 additions and 41 deletions

View file

@ -58,10 +58,14 @@ struct DungeonParams {
// Room size random range. Includes walls / floor / ceilng
v3s16 room_size_min;
v3s16 room_size_max;
// Large room size
v3s16 room_size_large;
// First generated room is large
bool first_room_large;
// Large room size random range. Includes walls / floor / ceilng
v3s16 room_size_large_min;
v3s16 room_size_large_max;
// Value 0 disables large rooms.
// Value 1 results in 1 large room, the first generated room.
// Value > 1 makes the first generated room large, all other rooms have a
// '1 in value' chance of being large.
u16 large_room_chance;
// Dimensions of 3D 'brush' that creates corridors.
// Dimensions are of the empty space, not including walls / floor / ceilng.
v3s16 holesize;