Mapgen Carpathian: Add lava_depth parameter
authorvlapsley <vaughan.lapsley@gmail.com>
Fri, 7 Jul 2017 03:49:55 +0000 (13:49 +1000)
committerparamat <mat.gregory@virginmedia.com>
Fri, 7 Jul 2017 21:28:40 +0000 (22:28 +0100)
builtin/settingtypes.txt
minetest.conf.example
src/mapgen_carpathian.cpp
src/mapgen_carpathian.h

index 0f2a329ad44868c1243d1a3f64fd56adf84105db..87b33fa02bfc564cb0de33448dd5553073cf537d 100644 (file)
@@ -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
 
index 5d54c23f34221b99a08d8860b8ace2f2ce4062d2..de5e0f5663d8455f46bfdac5c933814add3dded6 100644 (file)
 #    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
index 8529fd55adbd3babaeceecbfad46f124262740ae..c332390873775ef95393ed97a13bf703fc17b8e5 100644 (file)
@@ -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);
index 2dba409af766e10b4f7c801215e162e837bd6094..0dfb6fd2c9852712a0f71fa9ebf1fe8a3fd82d06 100644 (file)
@@ -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;