Document the deprecation of hardcoded cave liquids (#8692)
authorParamat <paramat@users.noreply.github.com>
Sat, 20 Jul 2019 00:03:52 +0000 (01:03 +0100)
committerGitHub <noreply@github.com>
Sat, 20 Jul 2019 00:03:52 +0000 (01:03 +0100)
builtin/settingtypes.txt
src/mapgen/cavegen.cpp
src/mapgen/cavegen.h
src/mapgen/mapgen.h

index 15cb181ed1ec7ddfad6070716907b9d4beb27b0a..3afda994e2f20f88fe4e0debac491e915f95d997 100644 (file)
@@ -1375,6 +1375,7 @@ mgv5_cave_width (Cave width) float 0.09
 #    Y of upper limit of large caves.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 mgvalleys_lava_depth (Lava depth) int 1
 
index 4fa3e009d73775c8af8959343d9917e132ce5d35..fa34b72731c0f52cae5628c7cc4e15ef008674ec 100644 (file)
@@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "mg_biome.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);
 
 
@@ -526,7 +527,9 @@ void CavesRandomWalk::carveRoute(v3f vec, float f, bool randomize_xz)
                if (use_biome_liquid) {
                        liquidnode = c_biome_liquid;
                } 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,
                                startp.Y, startp.Z, seed);
                        liquidnode = (nval < 0.40f && node_max.Y < lava_depth) ?
index f5234a671379ff6c404e85b8a861c1b7faf1f833..3f1730ddb92d37b4b24f04e795da4aa728e53956 100644 (file)
@@ -119,6 +119,8 @@ public:
        // configurable parameters
        s32 seed;
        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;
        NoiseParams *np_caveliquids;
 
index f98c3f377e970272c67a5c280502b26af96f54a8..4740c424e0a73c92d64fb41ccfb5897e0463158a 100644 (file)
@@ -278,5 +278,7 @@ protected:
        float cavern_limit;
        float cavern_taper;
        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;
 };