Skip to content

Commit 76824ba

Browse files
authoredJul 20, 2019
Document the deprecation of hardcoded cave liquids (#8692)
1 parent a6f7848 commit 76824ba

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed
 

‎builtin/settingtypes.txt

+6
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,7 @@ mgv5_cave_width (Cave width) float 0.09
13751375
# Y of upper limit of large caves.
13761376
mgv5_large_cave_depth (Large cave depth) int -256
13771377

1378+
# Deprecated, define and locate cave liquids using biome definitions instead.
13781379
# Y of upper limit of lava in large caves.
13791380
mgv5_lava_depth (Lava depth) int -256
13801381

@@ -1491,6 +1492,7 @@ mgv7_cave_width (Cave width) float 0.09
14911492
# Y of upper limit of large caves.
14921493
mgv7_large_cave_depth (Large cave depth) int -33
14931494

1495+
# Deprecated, define and locate cave liquids using biome definitions instead.
14941496
# Y of upper limit of lava in large caves.
14951497
mgv7_lava_depth (Lava depth) int -256
14961498

@@ -1598,6 +1600,7 @@ mgcarpathian_cave_width (Cave width) float 0.09
15981600
# Y of upper limit of large caves.
15991601
mgcarpathian_large_cave_depth (Large cave depth) int -33
16001602

1603+
# Deprecated, define and locate cave liquids using biome definitions instead.
16011604
# Y of upper limit of lava in large caves.
16021605
mgcarpathian_lava_depth (Lava depth) int -256
16031606

@@ -1681,6 +1684,7 @@ mgflat_ground_level (Ground level) int 8
16811684
# Y of upper limit of large caves.
16821685
mgflat_large_cave_depth (Large cave depth) int -33
16831686

1687+
# Deprecated, define and locate cave liquids using biome definitions instead.
16841688
# Y of upper limit of lava in large caves.
16851689
mgflat_lava_depth (Lava depth) int -256
16861690

@@ -1734,6 +1738,7 @@ mgfractal_cave_width (Cave width) float 0.09
17341738
# Y of upper limit of large caves.
17351739
mgfractal_large_cave_depth (Large cave depth) int -33
17361740

1741+
# Deprecated, define and locate cave liquids using biome definitions instead.
17371742
# Y of upper limit of lava in large caves.
17381743
mgfractal_lava_depth (Lava depth) int -256
17391744

@@ -1856,6 +1861,7 @@ mgvalleys_altitude_chill (Altitude chill) int 90
18561861
# Depth below which you'll find large caves.
18571862
mgvalleys_large_cave_depth (Large cave depth) int -33
18581863

1864+
# Deprecated, define and locate cave liquids using biome definitions instead.
18591865
# Y of upper limit of lava in large caves.
18601866
mgvalleys_lava_depth (Lava depth) int 1
18611867

‎src/mapgen/cavegen.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2929
#include "mg_biome.h"
3030
#include "cavegen.h"
3131

32+
// TODO Remove this. Cave liquids are now defined and located using biome definitions
3233
static NoiseParams nparams_caveliquids(0, 1, v3f(150.0, 150.0, 150.0), 776, 3, 0.6, 2.0);
3334

3435

@@ -526,7 +527,9 @@ void CavesRandomWalk::carveRoute(v3f vec, float f, bool randomize_xz)
526527
if (use_biome_liquid) {
527528
liquidnode = c_biome_liquid;
528529
} else {
529-
// If cave liquid not defined by biome, fallback to old hardcoded behaviour
530+
// TODO remove this. Cave liquids are now defined and located using biome
531+
// definitions.
532+
// If cave liquid not defined by biome, fallback to old hardcoded behaviour.
530533
float nval = NoisePerlin3D(np_caveliquids, startp.X,
531534
startp.Y, startp.Z, seed);
532535
liquidnode = (nval < 0.40f && node_max.Y < lava_depth) ?

‎src/mapgen/cavegen.h

+2
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ class CavesRandomWalk
119119
// configurable parameters
120120
s32 seed;
121121
int water_level;
122+
// TODO 'lava_depth' and 'np_caveliquids' are deprecated and should be removed.
123+
// Cave liquids are now defined and located using biome definitions.
122124
int lava_depth;
123125
NoiseParams *np_caveliquids;
124126

‎src/mapgen/mapgen.h

+2
Original file line numberDiff line numberDiff line change
@@ -278,5 +278,7 @@ class MapgenBasic : public Mapgen {
278278
float cavern_limit;
279279
float cavern_taper;
280280
float cavern_threshold;
281+
// TODO 'lava_depth' is deprecated and should be removed. Cave liquids are
282+
// now defined and located using biome definitions.
281283
int lava_depth;
282284
};

0 commit comments

Comments
 (0)