aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlapsley <vaughan.lapsley@gmail.com>2017-07-07 13:49:55 +1000
committerparamat <mat.gregory@virginmedia.com>2017-07-07 22:28:40 +0100
commitf871852f13db6072b3bffe25826d7520ef031ec0 (patch)
treec33bf51e7163b883372e2ce27a9c62aeb0e61481
parent3caad3f3c9e319ca67d63231e8c64b2ace855fff (diff)
downloadminetest-f871852f13db6072b3bffe25826d7520ef031ec0.tar.gz
minetest-f871852f13db6072b3bffe25826d7520ef031ec0.tar.bz2
minetest-f871852f13db6072b3bffe25826d7520ef031ec0.zip
Mapgen Carpathian: Add lava_depth parameter
-rw-r--r--builtin/settingtypes.txt5
-rw-r--r--minetest.conf.example6
-rw-r--r--src/mapgen_carpathian.cpp3
-rw-r--r--src/mapgen_carpathian.h1
4 files changed, 13 insertions, 2 deletions
diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt
index 0f2a329ad..87b33fa02 100644
--- a/builtin/settingtypes.txt
+++ b/builtin/settingtypes.txt
@@ -1230,9 +1230,12 @@ mgcarpathian_spflags (Mapgen Carpathian specific flags) flags caverns caverns,no
# Controls width of tunnels, a smaller value creates wider tunnels.
mgcarpathian_cave_width (Cave width) float 0.09
-# Y of upper limit of large pseudorandom caves.
+# Y of upper limit of large caves.
mgcarpathian_large_cave_depth (Large cave depth) int -33
+# Y of upper limit of lava in large caves.
+mgcarpathian_lava_depth (Lava depth) int -256
+
# Y-level of cavern upper limit.
mgcarpathian_cavern_limit (Cavern limit) int -256
diff --git a/minetest.conf.example b/minetest.conf.example
index 5d54c23f3..de5e0f566 100644
--- a/minetest.conf.example
+++ b/minetest.conf.example
@@ -1496,10 +1496,14 @@
# type: float
# mgcarpathian_cave_width = 0.09
-# Y of upper limit of large pseudorandom caves.
+# Y of upper limit of large caves.
# type: int
# mgcarpathian_large_cave_depth = -33
+# Y of upper limit of lava in large caves.
+# type: int
+# mgcarpathian_lava_depth = -256
+
# Y-level of cavern upper limit.
# type: int
# mgcarpathian_cavern_limit = -256
diff --git a/src/mapgen_carpathian.cpp b/src/mapgen_carpathian.cpp
index 8529fd55a..c33239087 100644
--- a/src/mapgen_carpathian.cpp
+++ b/src/mapgen_carpathian.cpp
@@ -57,6 +57,7 @@ MapgenCarpathian::MapgenCarpathian(
spflags = params->spflags;
cave_width = params->cave_width;
large_cave_depth = params->large_cave_depth;
+ lava_depth = params->lava_depth;
cavern_limit = params->cavern_limit;
cavern_taper = params->cavern_taper;
cavern_threshold = params->cavern_threshold;
@@ -131,6 +132,7 @@ void MapgenCarpathianParams::readParams(const Settings *settings)
settings->getFlagStrNoEx("mgcarpathian_spflags", spflags, flagdesc_mapgen_carpathian);
settings->getFloatNoEx("mgcarpathian_cave_width", cave_width);
settings->getS16NoEx("mgcarpathian_large_cave_depth", large_cave_depth);
+ settings->getS16NoEx("mgcarpathian_lava_depth", lava_depth);
settings->getS16NoEx("mgcarpathian_cavern_limit", cavern_limit);
settings->getS16NoEx("mgcarpathian_cavern_taper", cavern_taper);
settings->getFloatNoEx("mgcarpathian_cavern_threshold", cavern_threshold);
@@ -159,6 +161,7 @@ void MapgenCarpathianParams::writeParams(Settings *settings) const
settings->setFlagStr("mgcarpathian_spflags", spflags, flagdesc_mapgen_carpathian, U32_MAX);
settings->setFloat("mgcarpathian_cave_width", cave_width);
settings->setS16("mgcarpathian_large_cave_depth", large_cave_depth);
+ settings->setS16("mgcarpathian_lava_depth", lava_depth);
settings->setS16("mgcarpathian_cavern_limit", cavern_limit);
settings->setS16("mgcarpathian_cavern_taper", cavern_taper);
settings->setFloat("mgcarpathian_cavern_threshold", cavern_threshold);
diff --git a/src/mapgen_carpathian.h b/src/mapgen_carpathian.h
index 2dba409af..0dfb6fd2c 100644
--- a/src/mapgen_carpathian.h
+++ b/src/mapgen_carpathian.h
@@ -37,6 +37,7 @@ struct MapgenCarpathianParams : public MapgenParams
u32 spflags = MGCARPATHIAN_CAVERNS;
float cave_width = 0.09f;
s16 large_cave_depth = -33;
+ s16 lava_depth = -256;
s16 cavern_limit = -256;
s16 cavern_taper = 256;
float cavern_threshold = 0.7f;