1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-15 09:25:37 +02:00

Mainmenu game-related changes (#11887)

fixes:
* Switching between games does not immediately hide creative mode / damage buttons if so specified
* World creation menu has a game selection list even though the menu already provides a gamebar
* Showing gameid in world list is unnecessary
* Choice of mapgen parameters in menu persists between games (and was half-broken)
This commit is contained in:
sfan5
2022-01-09 21:15:35 +01:00
committed by GitHub
parent b164e16d1b
commit 4c8c649779
9 changed files with 262 additions and 210 deletions

View File

@@ -1018,10 +1018,11 @@ MapgenParams::~MapgenParams()
void MapgenParams::readParams(const Settings *settings)
{
std::string seed_str;
const char *seed_name = (settings == g_settings) ? "fixed_map_seed" : "seed";
// should always be used via MapSettingsManager
assert(settings != g_settings);
if (settings->getNoEx(seed_name, seed_str)) {
std::string seed_str;
if (settings->getNoEx("seed", seed_str)) {
if (!seed_str.empty())
seed = read_seed(seed_str.c_str());
else