summaryrefslogtreecommitdiff
path: root/src/mapgen/cavegen.h
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2019-11-08 03:09:43 +0000
committerGitHub <noreply@github.com>2019-11-08 03:09:43 +0000
commit2a74727857a9bfd950ce1e6a58e0ade879033574 (patch)
treefcb59f922de4336a9a7abf37842567089d1638e9 /src/mapgen/cavegen.h
parent5506e97ed897dde2d4820fe1b021a4622bae03b3 (diff)
downloadminetest-2a74727857a9bfd950ce1e6a58e0ade879033574.tar.gz
minetest-2a74727857a9bfd950ce1e6a58e0ade879033574.tar.bz2
minetest-2a74727857a9bfd950ce1e6a58e0ade879033574.zip
Randomwalk caves: Add parameters for number, proportion flooded. Allow small caves (#8928)
Add mapgen parameters to set the range of the random number of randomwalk caves per mapchunk, and to set the proportion that are flooded with liquids. Default values are, for now, unchanged from the previous hardcoded values. Add parameters to allow small randomwalk caves Disabled by default for now as they have never been present in the non-mgv6 mapgens.
Diffstat (limited to 'src/mapgen/cavegen.h')
-rw-r--r--src/mapgen/cavegen.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mapgen/cavegen.h b/src/mapgen/cavegen.h
index 3f1730ddb..dc73e83f1 100644
--- a/src/mapgen/cavegen.h
+++ b/src/mapgen/cavegen.h
@@ -116,15 +116,14 @@ public:
s16 *heightmap;
BiomeGen *bmgn;
- // configurable parameters
s32 seed;
int water_level;
+ float large_cave_flooded;
// TODO 'lava_depth' and 'np_caveliquids' are deprecated and should be removed.
// Cave liquids are now defined and located using biome definitions.
int lava_depth;
NoiseParams *np_caveliquids;
- // intermediate state variables
u16 ystride;
s16 min_tunnel_diameter;
@@ -161,7 +160,8 @@ public:
CavesRandomWalk(const NodeDefManager *ndef, GenerateNotifier *gennotify =
NULL, s32 seed = 0, int water_level = 1, content_t water_source =
CONTENT_IGNORE, content_t lava_source = CONTENT_IGNORE,
- int lava_depth = -256, BiomeGen *biomegen = NULL);
+ float large_cave_flooded = 0.5f, int lava_depth = -256,
+ BiomeGen *biomegen = NULL);
// vm and ps are mandatory parameters.
// If heightmap is NULL, the surface level at all points is assumed to