From: vlapsley Date: Fri, 7 Jul 2017 03:49:55 +0000 (+1000) Subject: Mapgen Carpathian: Add lava_depth parameter X-Git-Tag: 5.0.0~1032 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f871852f13db6072b3bffe25826d7520ef031ec0;p=oweals%2Fminetest.git Mapgen Carpathian: Add lava_depth parameter --- 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;