diff options
author | paramat <paramat@users.noreply.github.com> | 2017-06-21 04:20:18 +0100 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-06-22 03:14:56 +0100 |
commit | 2652d8db19fb2758de1da4c04ce169f80c87e5c7 (patch) | |
tree | b2e88382103c2084e642db43ad9823867bdbaa88 /src/mapgen_fractal.cpp | |
parent | bc53c82bcf923d11725e3de8565eb4c7e435cd2b (diff) | |
download | minetest-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_fractal.cpp')
-rw-r--r-- | src/mapgen_fractal.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mapgen_fractal.cpp b/src/mapgen_fractal.cpp index a99b3006b..b43dcd3f0 100644 --- a/src/mapgen_fractal.cpp +++ b/src/mapgen_fractal.cpp @@ -52,6 +52,7 @@ MapgenFractal::MapgenFractal(int mapgenid, MapgenFractalParams *params, EmergeMa 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->fractal = params->fractal; this->iterations = params->iterations; this->scale = params->scale; @@ -95,6 +96,7 @@ void MapgenFractalParams::readParams(const Settings *settings) settings->getFlagStrNoEx("mgfractal_spflags", spflags, flagdesc_mapgen_fractal); settings->getFloatNoEx("mgfractal_cave_width", cave_width); settings->getS16NoEx("mgfractal_large_cave_depth", large_cave_depth); + settings->getS16NoEx("mgfractal_lava_depth", lava_depth); settings->getU16NoEx("mgfractal_fractal", fractal); settings->getU16NoEx("mgfractal_iterations", iterations); settings->getV3FNoEx("mgfractal_scale", scale); @@ -117,6 +119,7 @@ void MapgenFractalParams::writeParams(Settings *settings) const settings->setFlagStr("mgfractal_spflags", spflags, flagdesc_mapgen_fractal, U32_MAX); settings->setFloat("mgfractal_cave_width", cave_width); settings->setS16("mgfractal_large_cave_depth", large_cave_depth); + settings->setS16("mgfractal_lava_depth", lava_depth); settings->setU16("mgfractal_fractal", fractal); settings->setU16("mgfractal_iterations", iterations); settings->setV3F("mgfractal_scale", scale); |