Move duplicated mapgen parameters to class MapgenBasic (#9134)
authorParamat <paramat@users.noreply.github.com>
Tue, 19 Nov 2019 19:59:17 +0000 (19:59 +0000)
committerGitHub <noreply@github.com>
Tue, 19 Nov 2019 19:59:17 +0000 (19:59 +0000)
'large_cave_depth', 'dungeon_ymin' and 'dungeon_ymax' are duplicated across many mapgens so should have been in class MapgenBasic from the start.

src/mapgen/mapgen.h
src/mapgen/mapgen_carpathian.h
src/mapgen/mapgen_flat.h
src/mapgen/mapgen_fractal.h
src/mapgen/mapgen_v5.h
src/mapgen/mapgen_v7.h
src/mapgen/mapgen_valleys.h

index 11db0353867239a293947307903b72c3c1f9e6df..a44a8dd3b4fa57040836afd058a8a671e43fcb27 100644 (file)
@@ -285,4 +285,7 @@ protected:
        int large_cave_num_min;
        int large_cave_num_max;
        float large_cave_flooded;
+       s16 large_cave_depth;
+       s16 dungeon_ymin;
+       s16 dungeon_ymax;
 };
index f77ffd1b15422b6f0a78cc4206a763f0bab8d07f..ef49df213c24947065a2f73a51deca4a191a9026 100644 (file)
@@ -93,10 +93,6 @@ private:
        float river_depth;
        float valley_width;
 
-       s16 large_cave_depth;
-       s16 dungeon_ymin;
-       s16 dungeon_ymax;
-
        Noise *noise_height1;
        Noise *noise_height2;
        Noise *noise_height3;
index dd6d51f54cd2d23f7315c75ff2a3cb7440731666..2ff87c0db2f5192730ee1bc31ddeea4a53281f58 100644 (file)
@@ -75,13 +75,10 @@ public:
 
 private:
        s16 ground_level;
-       s16 large_cave_depth;
        float lake_threshold;
        float lake_steepness;
        float hill_threshold;
        float hill_steepness;
-       s16 dungeon_ymin;
-       s16 dungeon_ymax;
 
        Noise *noise_terrain;
 };
index e5cb2c8327084044c6a00988c663c4b4160c785d..0654d036047c47a4fd2213cd4e1c29b0ee727002 100644 (file)
@@ -85,10 +85,6 @@ public:
 private:
        u16 formula;
        bool julia;
-
-       s16 large_cave_depth;
-       s16 dungeon_ymin;
-       s16 dungeon_ymax;
        u16 fractal;
        u16 iterations;
        v3f scale;
index 4623405a1491eb7cc8677991d14c6b130d0a5e3b..ecdcdaf4107bc5a6114b30d2daa690c59502ae48 100644 (file)
@@ -74,10 +74,6 @@ public:
        int generateBaseTerrain();
 
 private:
-       s16 large_cave_depth;
-       s16 dungeon_ymin;
-       s16 dungeon_ymax;
-
        Noise *noise_factor;
        Noise *noise_height;
        Noise *noise_ground;
index 85c9b6beba9faf4fa5d98552982362b469c6e85f..f23dee61b719279fc9350765112ec73e48092234 100644 (file)
@@ -108,10 +108,6 @@ private:
        s16 floatland_level;
        s16 shadow_limit;
 
-       s16 large_cave_depth;
-       s16 dungeon_ymin;
-       s16 dungeon_ymax;
-
        Noise *noise_terrain_base;
        Noise *noise_terrain_alt;
        Noise *noise_terrain_persist;
index f5a19eaec39546429b494ad37a3c287eae24c7bd..be97f07638861051c8f15ce4c3dcf4333f3c3228 100644 (file)
@@ -100,10 +100,6 @@ private:
        float river_depth_bed;
        float river_size_factor;
 
-       s16 large_cave_depth;
-       s16 dungeon_ymin;
-       s16 dungeon_ymax;
-
        Noise *noise_inter_valley_fill;
        Noise *noise_inter_valley_slope;
        Noise *noise_rivers;