summaryrefslogtreecommitdiff
path: root/src/mapgen/dungeongen.h
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2019-07-16 20:39:58 +0100
committerGitHub <noreply@github.com>2019-07-16 20:39:58 +0100
commit458f6175753314583637006f00c426ba22ba86d7 (patch)
tree8688e943dfc635a053ce9fd6db0e1fb37e5969c1 /src/mapgen/dungeongen.h
parent47492386ece5b016a7a0ed06d6a44cc7d60adb55 (diff)
downloadminetest-458f6175753314583637006f00c426ba22ba86d7.tar.gz
minetest-458f6175753314583637006f00c426ba22ba86d7.tar.bz2
minetest-458f6175753314583637006f00c426ba22ba86d7.zip
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.
Diffstat (limited to 'src/mapgen/dungeongen.h')
-rw-r--r--src/mapgen/dungeongen.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mapgen/dungeongen.h b/src/mapgen/dungeongen.h
index dd5245fa9..d2e733f71 100644
--- a/src/mapgen/dungeongen.h
+++ b/src/mapgen/dungeongen.h
@@ -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;