From 32d456bd2d4dda50f77c01c702d1b5a5ff26134b Mon Sep 17 00:00:00 2001 From: Paramat Date: Thu, 5 Apr 2018 17:21:41 +0100 Subject: Biome API / cavegen: Add definable cave liquid for a biome (#7192) Add 'node_cave_liquid' as a new field in biome registration. If field is absent cave liquids fall back to classic behaviour. --- src/mapgen/cavegen.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mapgen/cavegen.h') diff --git a/src/mapgen/cavegen.h b/src/mapgen/cavegen.h index 871ef3bcf..ff2923dc4 100644 --- a/src/mapgen/cavegen.h +++ b/src/mapgen/cavegen.h @@ -114,6 +114,7 @@ public: const NodeDefManager *ndef; GenerateNotifier *gennotify; s16 *heightmap; + BiomeGen *bmgn; // configurable parameters s32 seed; @@ -153,10 +154,11 @@ public: // ndef is a mandatory parameter. // If gennotify is NULL, generation events are not logged. + // If biomegen is NULL, cave liquids have classic behaviour. 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); + 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 -- cgit v1.2.3