aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen/mapgen_valleys.cpp
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2018-04-07 22:09:54 +0100
committerGitHub <noreply@github.com>2018-04-07 22:09:54 +0100
commit746ca41f58e356b0fbeeca1b43b7061ad1e1c02d (patch)
treef4cda48dac60ca7d8145de64cc2a208e7420d972 /src/mapgen/mapgen_valleys.cpp
parent460b375cad05cd1c32a061aeef2fd1dfb3fb95b4 (diff)
downloadminetest-746ca41f58e356b0fbeeca1b43b7061ad1e1c02d.tar.gz
minetest-746ca41f58e356b0fbeeca1b43b7061ad1e1c02d.tar.bz2
minetest-746ca41f58e356b0fbeeca1b43b7061ad1e1c02d.zip
Biome API / dungeons: Add biome-defined dungeon nodes
Add new biome fields 'node_dungeon', 'node_dungeon_alt', 'node_dungeon_stair'. If 'node_dungeon' is not defined dungeons fall back to classic behaviour. Remove messy and imprecise dungeon material code from 'generateBiomes()'. Code deciding dungeon materials is now in 'generateDungeons()' and uses the biome at mapchunk centre for more precision. Remove hardcoded 'MG_STONE' types as long intended.
Diffstat (limited to 'src/mapgen/mapgen_valleys.cpp')
-rw-r--r--src/mapgen/mapgen_valleys.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mapgen/mapgen_valleys.cpp b/src/mapgen/mapgen_valleys.cpp
index f4c3c7b79..af8845615 100644
--- a/src/mapgen/mapgen_valleys.cpp
+++ b/src/mapgen/mapgen_valleys.cpp
@@ -242,9 +242,7 @@ void MapgenValleys::makeChunk(BlockMakeData *data)
updateHeightmap(node_min, node_max);
// Place biome-specific nodes and build biomemap
- MgStoneType mgstone_type;
- content_t biome_stone;
- generateBiomes(&mgstone_type, &biome_stone);
+ generateBiomes();
// Cave creation.
if (flags & MG_CAVES)
@@ -253,7 +251,7 @@ void MapgenValleys::makeChunk(BlockMakeData *data)
// Dungeon creation
if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin &&
full_node_max.Y <= dungeon_ymax)
- generateDungeons(stone_surface_max_y, mgstone_type, biome_stone);
+ generateDungeons(stone_surface_max_y);
// Generate the registered decorations
if (flags & MG_DECORATIONS)