aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen_v7.cpp
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2017-06-21 04:20:18 +0100
committerparamat <mat.gregory@virginmedia.com>2017-06-22 03:14:56 +0100
commit2652d8db19fb2758de1da4c04ce169f80c87e5c7 (patch)
treeb2e88382103c2084e642db43ad9823867bdbaa88 /src/mapgen_v7.cpp
parentbc53c82bcf923d11725e3de8565eb4c7e435cd2b (diff)
downloadminetest-2652d8db19fb2758de1da4c04ce169f80c87e5c7.tar.gz
minetest-2652d8db19fb2758de1da4c04ce169f80c87e5c7.tar.bz2
minetest-2652d8db19fb2758de1da4c04ce169f80c87e5c7.zip
CavesRandomWalk: Make 'lava_depth' a mapgen parameter
As with 'large_cave_depth', lava depth was previously a fixed y value and therefore incompatible with the ability to shift terrain vertically. Add 'lava_depth' mapgen parameter to mgflat, mgfractal, mgv5, mgv7.
Diffstat (limited to 'src/mapgen_v7.cpp')
-rw-r--r--src/mapgen_v7.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp
index 409863fa2..5d150ee1c 100644
--- a/src/mapgen_v7.cpp
+++ b/src/mapgen_v7.cpp
@@ -57,6 +57,7 @@ MapgenV7::MapgenV7(int mapgenid, MapgenV7Params *params, EmergeManager *emerge)
this->spflags = params->spflags;
this->cave_width = params->cave_width;
this->large_cave_depth = params->large_cave_depth;
+ this->lava_depth = params->lava_depth;
this->float_mount_density = params->float_mount_density;
this->float_mount_height = params->float_mount_height;
this->floatland_level = params->floatland_level;
@@ -145,6 +146,7 @@ void MapgenV7Params::readParams(const Settings *settings)
settings->getFlagStrNoEx("mgv7_spflags", spflags, flagdesc_mapgen_v7);
settings->getFloatNoEx("mgv7_cave_width", cave_width);
settings->getS16NoEx("mgv7_large_cave_depth", large_cave_depth);
+ settings->getS16NoEx("mgv7_lava_depth", lava_depth);
settings->getFloatNoEx("mgv7_float_mount_density", float_mount_density);
settings->getFloatNoEx("mgv7_float_mount_height", float_mount_height);
settings->getS16NoEx("mgv7_floatland_level", floatland_level);
@@ -175,6 +177,7 @@ void MapgenV7Params::writeParams(Settings *settings) const
settings->setFlagStr("mgv7_spflags", spflags, flagdesc_mapgen_v7, U32_MAX);
settings->setFloat("mgv7_cave_width", cave_width);
settings->setS16("mgv7_large_cave_depth", large_cave_depth);
+ settings->setS16("mgv7_lava_depth", lava_depth);
settings->setFloat("mgv7_float_mount_density", float_mount_density);
settings->setFloat("mgv7_float_mount_height", float_mount_height);
settings->setS16("mgv7_floatland_level", floatland_level);