From 0cde6fc5525e361a2fd197df2e64895019bbb8ec Mon Sep 17 00:00:00 2001 From: Paramat Date: Thu, 25 Jul 2019 20:46:28 +0100 Subject: 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. --- src/mapgen/mapgen.cpp | 14 ++++++++++---- src/mapgen/mapgen.h | 9 +++++---- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'src/mapgen') diff --git a/src/mapgen/mapgen.cpp b/src/mapgen/mapgen.cpp index 67e9d644d..2a6bcf347 100644 --- a/src/mapgen/mapgen.cpp +++ b/src/mapgen/mapgen.cpp @@ -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( diff --git a/src/mapgen/mapgen.h b/src/mapgen/mapgen.h index 4740c424e..b10aa7b9e 100644 --- a/src/mapgen/mapgen.h +++ b/src/mapgen/mapgen.h @@ -102,15 +102,16 @@ private: std::list 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, }; -- cgit v1.2.3