aboutsummaryrefslogtreecommitdiff
path: root/src/mg_biome.cpp
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2014-12-28 05:20:42 +0000
committerkwolekr <kwolekr@minetest.net>2014-12-28 21:37:43 -0500
commit570c2042b1b11fc1581dceb22c74cf47bb217134 (patch)
tree5f9823b69b595a2d2ecaf499dbebabcac98b477f /src/mg_biome.cpp
parent61dfa912f5f37f435e41b3c7d8cdb6244562e597 (diff)
downloadminetest-570c2042b1b11fc1581dceb22c74cf47bb217134.tar.gz
minetest-570c2042b1b11fc1581dceb22c74cf47bb217134.tar.bz2
minetest-570c2042b1b11fc1581dceb22c74cf47bb217134.zip
Biome API: Add shore top and shore filler nodes, underwater node, water top node. Add water top depth and shore height parameters. Remove water dust node
Diffstat (limited to 'src/mg_biome.cpp')
-rw-r--r--src/mg_biome.cpp30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/mg_biome.cpp b/src/mg_biome.cpp
index 763bef1bc..0492980ee 100644
--- a/src/mg_biome.cpp
+++ b/src/mg_biome.cpp
@@ -38,23 +38,28 @@ BiomeManager::BiomeManager(IGameDef *gamedef) :
// Create default biome to be used in case none exist
Biome *b = new Biome;
- b->id = 0;
- b->name = "Default";
- b->flags = 0;
- b->depth_top = 0;
- b->depth_filler = 0;
- b->height_min = -MAP_GENERATION_LIMIT;
- b->height_max = MAP_GENERATION_LIMIT;
- b->heat_point = 0.0;
- b->humidity_point = 0.0;
+ b->id = 0;
+ b->name = "Default";
+ b->flags = 0;
+ b->depth_top = 0;
+ b->depth_filler = 0;
+ b->height_shore = 0;
+ b->depth_water_top = 0;
+ b->height_min = -MAP_GENERATION_LIMIT;
+ b->height_max = MAP_GENERATION_LIMIT;
+ b->heat_point = 0.0;
+ b->humidity_point = 0.0;
NodeResolveInfo *nri = new NodeResolveInfo(b);
nri->nodenames.push_back("air");
nri->nodenames.push_back("air");
+ nri->nodenames.push_back("air");
+ nri->nodenames.push_back("air");
+ nri->nodenames.push_back("air");
nri->nodenames.push_back("mapgen_stone");
nri->nodenames.push_back("mapgen_water_source");
- nri->nodenames.push_back("air");
nri->nodenames.push_back("mapgen_water_source");
+ nri->nodenames.push_back("air");
m_ndef->pendNodeResolve(nri);
add(b);
@@ -121,9 +126,12 @@ void Biome::resolveNodeNames(NodeResolveInfo *nri)
{
m_ndef->getIdFromResolveInfo(nri, "mapgen_dirt_with_grass", CONTENT_AIR, c_top);
m_ndef->getIdFromResolveInfo(nri, "mapgen_dirt", CONTENT_AIR, c_filler);
+ m_ndef->getIdFromResolveInfo(nri, "mapgen_sand", CONTENT_AIR, c_shore_top);
+ m_ndef->getIdFromResolveInfo(nri, "mapgen_sand", CONTENT_AIR, c_shore_filler);
+ m_ndef->getIdFromResolveInfo(nri, "mapgen_sand", CONTENT_AIR, c_underwater);
m_ndef->getIdFromResolveInfo(nri, "mapgen_stone", CONTENT_AIR, c_stone);
+ m_ndef->getIdFromResolveInfo(nri, "mapgen_water_source", CONTENT_AIR, c_water_top);
m_ndef->getIdFromResolveInfo(nri, "mapgen_water_source", CONTENT_AIR, c_water);
m_ndef->getIdFromResolveInfo(nri, "air", CONTENT_IGNORE, c_dust);
- m_ndef->getIdFromResolveInfo(nri, "mapgen_water_source", CONTENT_IGNORE, c_dust_water);
}