# HG changeset patch # User rubidium # Date 2014-09-21 14:45:35 # Node ID 86adbc3cb56d8fee4b95e5e783f71a0b0f055b54 # Parent ee609f2aba8aeb57a25790a8ebc69c615cb4fde7 (svn r26890) -Cleanup: remove unneeded obfuscation via IConsoleSetSetting diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -24,7 +24,6 @@ #include "widgets/dropdown_func.h" #include "querystring_gui.h" #include "town.h" -#include "settings_func.h" #include "core/geometry_func.hpp" #include "core/random_func.hpp" #include "progress.h" @@ -733,20 +732,11 @@ struct GenerateLandscapeWindow : public SetDParam(0, _settings_newgame.game_creation.custom_town_number); ShowQueryString(STR_JUST_INT, STR_MAPGEN_NUMBER_OF_TOWNS, 5, this, CS_NUMERAL, QSF_NONE); } - IConsoleSetSetting("difficulty.number_towns", index); - break; - - case WID_GL_INDUSTRY_PULLDOWN: - IConsoleSetSetting("difficulty.industry_density", index); + _settings_newgame.difficulty.number_towns = index; break; - case WID_GL_TERRAIN_PULLDOWN: { - GameMode old_gm = _game_mode; - _game_mode = GM_MENU; - IConsoleSetSetting("difficulty.terrain_type", index); - _game_mode = old_gm; - break; - } + case WID_GL_INDUSTRY_PULLDOWN: _settings_newgame.difficulty.industry_density = index; break; + case WID_GL_TERRAIN_PULLDOWN: _settings_newgame.difficulty.terrain_type = index; break; case WID_GL_WATER_PULLDOWN: { if ((uint)index == CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY) { @@ -754,10 +744,7 @@ struct GenerateLandscapeWindow : public SetDParam(0, _settings_newgame.game_creation.custom_sea_level); ShowQueryString(STR_JUST_INT, STR_MAPGEN_QUANTITY_OF_SEA_LAKES, 3, this, CS_NUMERAL, QSF_NONE); } - GameMode old_gm = _game_mode; - _game_mode = GM_MENU; - IConsoleSetSetting("difficulty.quantity_sea_lakes", index); - _game_mode = old_gm; + _settings_newgame.difficulty.quantity_sea_lakes = index; break; } }