Skip to content

Commit 0cde6fc

Browse files
authoredJul 25, 2019
Re-order mapgens in mainmenu and 'all settings' mapgen selection (#8705)
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.
1 parent 245a31d commit 0cde6fc

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed
 

Diff for: ‎builtin/settingtypes.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ profiler_print_interval (Engine profiling data print interval) int 0
13291329
# Creating a world in the main menu will override this.
13301330
# Current mapgens in a highly unstable state:
13311331
# - The optional floatlands of v7 (disabled by default).
1332-
mg_name (Mapgen name) enum v7 v5,v6,v7,valleys,carpathian,fractal,flat,singlenode
1332+
mg_name (Mapgen name) enum v7 v7,valleys,carpathian,v5,flat,fractal,singlenode,v6
13331333

13341334
# Water surface level of the world.
13351335
water_level (Water level) int 1

Diff for: ‎src/mapgen/mapgen.cpp

+10-4
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,21 @@ struct MapgenDesc {
8181
//// Built-in mapgens
8282
////
8383

84+
// Order used here defines the order of appearence in mainmenu.
85+
// v6 always last to discourage selection.
86+
// Special mapgens flat, fractal, singlenode, next to last. Of these, singlenode
87+
// last to discourage selection.
88+
// Of the remaining, v5 last due to age, v7 first due to being the default.
89+
// The order of 'enum MapgenType' in mapgen.h must match this order.
8490
static MapgenDesc g_reg_mapgens[] = {
85-
{"v5", true},
86-
{"v6", true},
8791
{"v7", true},
92+
{"valleys", true},
93+
{"carpathian", true},
94+
{"v5", true},
8895
{"flat", true},
8996
{"fractal", true},
90-
{"valleys", true},
9197
{"singlenode", true},
92-
{"carpathian", true},
98+
{"v6", true},
9399
};
94100

95101
STATIC_ASSERT(

Diff for: ‎src/mapgen/mapgen.h

+5-4
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,16 @@ class GenerateNotifier {
102102
std::list<GenNotifyEvent> m_notify_events;
103103
};
104104

105+
// Order must match the order of 'static MapgenDesc g_reg_mapgens[]' in mapgen.cpp
105106
enum MapgenType {
106-
MAPGEN_V5,
107-
MAPGEN_V6,
108107
MAPGEN_V7,
108+
MAPGEN_VALLEYS,
109+
MAPGEN_CARPATHIAN,
110+
MAPGEN_V5,
109111
MAPGEN_FLAT,
110112
MAPGEN_FRACTAL,
111-
MAPGEN_VALLEYS,
112113
MAPGEN_SINGLENODE,
113-
MAPGEN_CARPATHIAN,
114+
MAPGEN_V6,
114115
MAPGEN_INVALID,
115116
};
116117

0 commit comments

Comments
 (0)