diff options
author | yexo <yexo@openttd.org> | 2009-02-21 02:34:53 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-02-21 02:34:53 +0000 |
commit | c3c549f73105b88cf728744587821721a9e45c0f (patch) | |
tree | f078747297abae0d4c76406a0b8e0d6b37a2a9c5 /src/genworld_gui.cpp | |
parent | 13bc604fde0f4d3f3620809507cfe045c1b96b4b (diff) | |
download | openttd-c3c549f73105b88cf728744587821721a9e45c0f.tar.xz |
(svn r15538) -Fix (r15334): The difficulty level wasn't set to custom when changing the amount of towns/industries from the newgame gui.
Diffstat (limited to 'src/genworld_gui.cpp')
-rw-r--r-- | src/genworld_gui.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 10d1b97df..525e625e9 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -571,15 +571,11 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { case GLAND_SMOOTHNESS_PULLDOWN: _settings_newgame.game_creation.tgen_smoothness = index; break; case GLAND_TOWN_PULLDOWN: - _settings_newgame.difficulty.number_towns = index; - if (_settings_newgame.difficulty.diff_level != 3) ShowErrorMessage(INVALID_STRING_ID, STR_DIFFICULTY_TO_CUSTOM, 0, 0); - IConsoleSetSetting("difficulty.number_towns", _settings_newgame.difficulty.number_towns); + IConsoleSetSetting("difficulty.number_towns", index); break; case GLAND_INDUSTRY_PULLDOWN: - _settings_newgame.difficulty.number_industries = index; - if (_settings_newgame.difficulty.diff_level != 3) ShowErrorMessage(INVALID_STRING_ID, STR_DIFFICULTY_TO_CUSTOM, 0, 0); - IConsoleSetSetting("difficulty.number_industries", _settings_newgame.difficulty.number_industries); + IConsoleSetSetting("difficulty.number_industries", index); break; case GLAND_LANDSCAPE_PULLDOWN: @@ -592,15 +588,11 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { break; case GLAND_TERRAIN_PULLDOWN: - _settings_newgame.difficulty.terrain_type = index; - if (_settings_newgame.difficulty.diff_level != 3) ShowErrorMessage(INVALID_STRING_ID, STR_DIFFICULTY_TO_CUSTOM, 0, 0); - IConsoleSetSetting("difficulty.terrain_type", _settings_newgame.difficulty.terrain_type); + IConsoleSetSetting("difficulty.terrain_type", index); break; case GLAND_WATER_PULLDOWN: - _settings_newgame.difficulty.quantity_sea_lakes = index; - if (_settings_newgame.difficulty.diff_level != 3) ShowErrorMessage(INVALID_STRING_ID, STR_DIFFICULTY_TO_CUSTOM, 0, 0); - IConsoleSetSetting("difficulty.quantity_sea_lakes", _settings_newgame.difficulty.quantity_sea_lakes); + IConsoleSetSetting("difficulty.quantity_sea_lakes", index); break; } this->SetDirty(); |