1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Dungeons: Clean up parameters, improve structure variety (#8918)

While preserving the general character of dungeon structure.
Slightly increase the range of standard room horizontal size, while
preserving the average horizontal size.
Return to classic maximum large room size of 16x16x16.
Make 1 in 4 dungeons have a 1 in 8 chance for each room being 'large',
making multiple large rooms possible for the first time.
Make 1 in 8 dungeons allow diagonal corridors, to make these a little
more common.
Make corridor width vary from 1 to 2, but forced to 2 if diagonal
corridors are allowed, to make them passable.
Add some comments.
This commit is contained in:
Paramat 2019-09-14 23:02:07 +01:00 committed by GitHub
parent 1de4ca1f9d
commit 23bd5630d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 11 deletions

View file

@ -889,19 +889,21 @@ void MapgenBasic::generateDungeons(s16 max_stone_y)
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_dungeons = num_dungeons;
dp.notifytype = GENNOTIFY_DUNGEON;
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.room_size_min = v3s16(5, 5, 5);
dp.room_size_max = v3s16(12, 6, 12);
dp.room_size_large_min = v3s16(12, 6, 12);
dp.room_size_large_max = v3s16(16, 16, 16);
dp.large_room_chance = (ps.range(1, 4) == 1) ? 8 : 0;
dp.diagonal_dirs = ps.range(1, 8) == 1;
// Diagonal corridors must have 'hole' width >=2 to be passable
u8 holewidth = (dp.diagonal_dirs) ? 2 : ps.range(1, 2);
dp.holesize = v3s16(holewidth, 3, holewidth);
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);