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

Dungeons: Use biome 'node_stone' if normal stone types not detected

Construct dungeons from the node defined as biome 'node_stone' if
'mapgen_stone', 'mapgen_desert_stone' and 'mapgen_sandstone' are not
detected.
Feature long-intended by kwolekr/hmmmm and present in code as a TODO.
This commit is contained in:
paramat 2017-07-28 03:31:11 +01:00 committed by paramat
parent 238d752fa3
commit b20d01a3f1
8 changed files with 61 additions and 22 deletions

View file

@ -308,7 +308,10 @@ void MapgenV7::makeChunk(BlockMakeData *data)
// Init biome generator, place biome-specific nodes, and build biomemap
biomegen->calcBiomeNoise(node_min);
MgStoneType stone_type = generateBiomes(biome_zero_level);
MgStoneType mgstone_type;
content_t biome_stone;
generateBiomes(&mgstone_type, &biome_stone, water_level - 1);
// Generate caverns, tunnels and classic caves
if (flags & MG_CAVES) {
@ -328,7 +331,7 @@ void MapgenV7::makeChunk(BlockMakeData *data)
// Generate dungeons
if (flags & MG_DUNGEONS)
generateDungeons(stone_surface_max_y, stone_type);
generateDungeons(stone_surface_max_y, mgstone_type, biome_stone);
// Generate the registered decorations
if (flags & MG_DECORATIONS)