Re-order mapgens in mainmenu and 'all settings' mapgen selection (#8705)
authorParamat <paramat@users.noreply.github.com>
Thu, 25 Jul 2019 19:46:28 +0000 (20:46 +0100)
committerGitHub <noreply@github.com>
Thu, 25 Jul 2019 19:46:28 +0000 (20:46 +0100)
v6 always last to discourage selection.
Special mapgens flat, fractal, singlenode, next to last. Of these, singlenode
last to discourage selection.
Of the remaining, v5 last due to age, v7 first due to being the default.

builtin/settingtypes.txt
src/mapgen/mapgen.cpp
src/mapgen/mapgen.h

index 7d546cbd60ea39883118c22f56fe040775c12108..931fe26da3d77dd4978523cb665105e14e8a2235 100644 (file)
@@ -1329,7 +1329,7 @@ profiler_print_interval (Engine profiling data print interval) int 0
 #    Creating a world in the main menu will override this.
 #    Current mapgens in a highly unstable state:
 #    -    The optional floatlands of v7 (disabled by default).
-mg_name (Mapgen name) enum v7 v5,v6,v7,valleys,carpathian,fractal,flat,singlenode
+mg_name (Mapgen name) enum v7 v7,valleys,carpathian,v5,flat,fractal,singlenode,v6
 
 #    Water surface level of the world.
 water_level (Water level) int 1
index 67e9d644d094d700be852f96cb9c8a6255de7012..2a6bcf3470ff49a9498b54049738a32d01105a2a 100644 (file)
@@ -81,15 +81,21 @@ struct MapgenDesc {
 //// Built-in mapgens
 ////
 
+// Order used here defines the order of appearence in mainmenu.
+// v6 always last to discourage selection.
+// Special mapgens flat, fractal, singlenode, next to last. Of these, singlenode
+// last to discourage selection.
+// Of the remaining, v5 last due to age, v7 first due to being the default.
+// The order of 'enum MapgenType' in mapgen.h must match this order.
 static MapgenDesc g_reg_mapgens[] = {
-       {"v5",         true},
-       {"v6",         true},
        {"v7",         true},
+       {"valleys",    true},
+       {"carpathian", true},
+       {"v5",         true},
        {"flat",       true},
        {"fractal",    true},
-       {"valleys",    true},
        {"singlenode", true},
-       {"carpathian", true},
+       {"v6",         true},
 };
 
 STATIC_ASSERT(
index 4740c424e0a73c92d64fb41ccfb5897e0463158a..b10aa7b9ed7fb4e4c89fce780028b8287914d0f4 100644 (file)
@@ -102,15 +102,16 @@ private:
        std::list<GenNotifyEvent> m_notify_events;
 };
 
+// Order must match the order of 'static MapgenDesc g_reg_mapgens[]' in mapgen.cpp
 enum MapgenType {
-       MAPGEN_V5,
-       MAPGEN_V6,
        MAPGEN_V7,
+       MAPGEN_VALLEYS,
+       MAPGEN_CARPATHIAN,
+       MAPGEN_V5,
        MAPGEN_FLAT,
        MAPGEN_FRACTAL,
-       MAPGEN_VALLEYS,
        MAPGEN_SINGLENODE,
-       MAPGEN_CARPATHIAN,
+       MAPGEN_V6,
        MAPGEN_INVALID,
 };