Document the deprecation of hardcoded cave liquids (#8692)

This commit is contained in:
Paramat 2019-07-20 01:03:52 +01:00 committed by GitHub
parent a6f7848352
commit 76824bac9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 1 deletions

@ -1375,6 +1375,7 @@ mgv5_cave_width (Cave width) float 0.09
# Y of upper limit of large caves. # Y of upper limit of large caves.
mgv5_large_cave_depth (Large cave depth) int -256 mgv5_large_cave_depth (Large cave depth) int -256
# Deprecated, define and locate cave liquids using biome definitions instead.
# Y of upper limit of lava in large caves. # Y of upper limit of lava in large caves.
mgv5_lava_depth (Lava depth) int -256 mgv5_lava_depth (Lava depth) int -256
@ -1491,6 +1492,7 @@ mgv7_cave_width (Cave width) float 0.09
# Y of upper limit of large caves. # Y of upper limit of large caves.
mgv7_large_cave_depth (Large cave depth) int -33 mgv7_large_cave_depth (Large cave depth) int -33
# Deprecated, define and locate cave liquids using biome definitions instead.
# Y of upper limit of lava in large caves. # Y of upper limit of lava in large caves.
mgv7_lava_depth (Lava depth) int -256 mgv7_lava_depth (Lava depth) int -256
@ -1598,6 +1600,7 @@ mgcarpathian_cave_width (Cave width) float 0.09
# Y of upper limit of large caves. # Y of upper limit of large caves.
mgcarpathian_large_cave_depth (Large cave depth) int -33 mgcarpathian_large_cave_depth (Large cave depth) int -33
# Deprecated, define and locate cave liquids using biome definitions instead.
# Y of upper limit of lava in large caves. # Y of upper limit of lava in large caves.
mgcarpathian_lava_depth (Lava depth) int -256 mgcarpathian_lava_depth (Lava depth) int -256
@ -1681,6 +1684,7 @@ mgflat_ground_level (Ground level) int 8
# Y of upper limit of large caves. # Y of upper limit of large caves.
mgflat_large_cave_depth (Large cave depth) int -33 mgflat_large_cave_depth (Large cave depth) int -33
# Deprecated, define and locate cave liquids using biome definitions instead.
# Y of upper limit of lava in large caves. # Y of upper limit of lava in large caves.
mgflat_lava_depth (Lava depth) int -256 mgflat_lava_depth (Lava depth) int -256
@ -1734,6 +1738,7 @@ mgfractal_cave_width (Cave width) float 0.09
# Y of upper limit of large caves. # Y of upper limit of large caves.
mgfractal_large_cave_depth (Large cave depth) int -33 mgfractal_large_cave_depth (Large cave depth) int -33
# Deprecated, define and locate cave liquids using biome definitions instead.
# Y of upper limit of lava in large caves. # Y of upper limit of lava in large caves.
mgfractal_lava_depth (Lava depth) int -256 mgfractal_lava_depth (Lava depth) int -256
@ -1856,6 +1861,7 @@ mgvalleys_altitude_chill (Altitude chill) int 90
# Depth below which you'll find large caves. # Depth below which you'll find large caves.
mgvalleys_large_cave_depth (Large cave depth) int -33 mgvalleys_large_cave_depth (Large cave depth) int -33
# Deprecated, define and locate cave liquids using biome definitions instead.
# Y of upper limit of lava in large caves. # Y of upper limit of lava in large caves.
mgvalleys_lava_depth (Lava depth) int 1 mgvalleys_lava_depth (Lava depth) int 1

@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mg_biome.h" #include "mg_biome.h"
#include "cavegen.h" #include "cavegen.h"
// TODO Remove this. Cave liquids are now defined and located using biome definitions
static NoiseParams nparams_caveliquids(0, 1, v3f(150.0, 150.0, 150.0), 776, 3, 0.6, 2.0); static NoiseParams nparams_caveliquids(0, 1, v3f(150.0, 150.0, 150.0), 776, 3, 0.6, 2.0);
@ -526,7 +527,9 @@ void CavesRandomWalk::carveRoute(v3f vec, float f, bool randomize_xz)
if (use_biome_liquid) { if (use_biome_liquid) {
liquidnode = c_biome_liquid; liquidnode = c_biome_liquid;
} else { } else {
// If cave liquid not defined by biome, fallback to old hardcoded behaviour // TODO remove this. Cave liquids are now defined and located using biome
// definitions.
// If cave liquid not defined by biome, fallback to old hardcoded behaviour.
float nval = NoisePerlin3D(np_caveliquids, startp.X, float nval = NoisePerlin3D(np_caveliquids, startp.X,
startp.Y, startp.Z, seed); startp.Y, startp.Z, seed);
liquidnode = (nval < 0.40f && node_max.Y < lava_depth) ? liquidnode = (nval < 0.40f && node_max.Y < lava_depth) ?

@ -119,6 +119,8 @@ public:
// configurable parameters // configurable parameters
s32 seed; s32 seed;
int water_level; int water_level;
// 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; int lava_depth;
NoiseParams *np_caveliquids; NoiseParams *np_caveliquids;

@ -278,5 +278,7 @@ protected:
float cavern_limit; float cavern_limit;
float cavern_taper; float cavern_taper;
float cavern_threshold; float cavern_threshold;
// TODO 'lava_depth' is deprecated and should be removed. Cave liquids are
// now defined and located using biome definitions.
int lava_depth; int lava_depth;
}; };