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

@ -189,13 +189,16 @@ void MapgenFlat::makeChunk(BlockMakeData *data)
// Init biome generator, place biome-specific nodes, and build biomemap
biomegen->calcBiomeNoise(node_min);
MgStoneType stone_type = generateBiomes(water_level - 1);
MgStoneType mgstone_type;
content_t biome_stone;
generateBiomes(&mgstone_type, &biome_stone, water_level - 1);
if (flags & MG_CAVES)
generateCaves(stone_surface_max_y, large_cave_depth);
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)