From 458f6175753314583637006f00c426ba22ba86d7 Mon Sep 17 00:00:00 2001 From: Paramat Date: Tue, 16 Jul 2019 20:39:58 +0100 Subject: 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. --- src/mapgen/mapgen.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/mapgen/mapgen.cpp') diff --git a/src/mapgen/mapgen.cpp b/src/mapgen/mapgen.cpp index 3d1549b7a..67e9d644d 100644 --- a/src/mapgen/mapgen.cpp +++ b/src/mapgen/mapgen.cpp @@ -877,20 +877,20 @@ void MapgenBasic::generateDungeons(s16 max_stone_y) dp.np_alt_wall = NoiseParams(-0.4, 1.0, v3f(40.0, 40.0, 40.0), 32474, 6, 1.1, 2.0); - dp.seed = seed; - dp.num_dungeons = num_dungeons; - dp.only_in_ground = true; - dp.num_rooms = ps.range(2, 16); - dp.room_size_min = v3s16(6, 5, 6); - dp.room_size_max = v3s16(10, 6, 10); - dp.room_size_large = v3s16( - ps.range(10, 18), ps.range(8, 16), ps.range(10, 18)); - dp.first_room_large = ps.range(1, 4) == 1; - dp.holesize = v3s16(2, 3, 2); - dp.corridor_len_min = 1; - dp.corridor_len_max = 13; - dp.diagonal_dirs = ps.range(1, 12) == 1; - dp.notifytype = GENNOTIFY_DUNGEON; + dp.seed = seed; + dp.num_dungeons = num_dungeons; + dp.only_in_ground = true; + dp.num_rooms = ps.range(2, 16); + dp.room_size_min = v3s16(6, 5, 6); + dp.room_size_max = v3s16(10, 6, 10); + dp.room_size_large_min = v3s16(10, 8, 10); + dp.room_size_large_max = v3s16(18, 16, 18); + dp.large_room_chance = (ps.range(1, 4) == 1) ? 1 : 0; + dp.holesize = v3s16(2, 3, 2); + dp.corridor_len_min = 1; + dp.corridor_len_max = 13; + dp.diagonal_dirs = ps.range(1, 12) == 1; + dp.notifytype = GENNOTIFY_DUNGEON; // Get biome at mapchunk midpoint v3s16 chunk_mid = node_min + (node_max - node_min) / v3s16(2, 2, 2); -- cgit v1.2.3