From b20d01a3f19ea7ad1e788077af1ed5769648e3a1 Mon Sep 17 00:00:00 2001 From: paramat Date: Fri, 28 Jul 2017 03:31:11 +0100 Subject: 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. --- src/mapgen_flat.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mapgen_flat.cpp') diff --git a/src/mapgen_flat.cpp b/src/mapgen_flat.cpp index 9ae9d208c..34074c8b7 100644 --- a/src/mapgen_flat.cpp +++ b/src/mapgen_flat.cpp @@ -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) -- cgit v1.2.3