1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

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.
This commit is contained in:
Paramat 2018-04-05 17:21:41 +01:00 committed by GitHub
parent 077f231111
commit 32d456bd2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 40 additions and 12 deletions

View file

@ -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