Mercurial > hg > openttd
changeset 18884:20a1f8ca081f draft
(svn r23733) -Fix-ish [FS#4939]: cheating to different climates messes things even more up than changing NewGRFs in-game... so guess what happened
author | rubidium <rubidium@openttd.org> |
---|---|
date | Tue, 03 Jan 2012 19:21:32 +0000 |
parents | 569906f583e3 |
children | 96b0234041dc |
files | src/cheat_gui.cpp src/cheat_type.h src/lang/english.txt |
diffstat | 3 files changed, 2 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -87,26 +87,6 @@ return _cheats.setup_prod.value; } -/** - * Handle changing of climate. - * @param p1 New climate. - * @param p2 Unused. - * @return New climate. - */ -static int32 ClickChangeClimateCheat(int32 p1, int32 p2) -{ - if (p1 == -1) p1 = 3; - if (p1 == 4) p1 = 0; - _settings_game.game_creation.landscape = p1; - - GamelogStartAction(GLAT_CHEAT); - GamelogTestMode(); - ReloadNewGRFData(); - GamelogStopAction(); - - return _settings_game.game_creation.landscape; -} - extern void EnginesMonthlyLoop(); /** @@ -140,7 +120,6 @@ CHT_CROSSINGTUNNELS, ///< Allow tunnels to cross each other. CHT_NO_JETCRASH, ///< Disable jet-airplane crashes. CHT_SETUP_PROD, ///< Allow manually editing of industry production. - CHT_SWITCH_CLIMATE, ///< Switch climate. CHT_CHANGE_DATE, ///< Do time traveling. CHT_NUM_CHEATS, ///< Number of cheats. @@ -173,7 +152,6 @@ {SLE_BOOL, STR_CHEAT_CROSSINGTUNNELS, &_cheats.crossing_tunnels.value, &_cheats.crossing_tunnels.been_used, NULL }, {SLE_BOOL, STR_CHEAT_NO_JETCRASH, &_cheats.no_jetcrash.value, &_cheats.no_jetcrash.been_used, NULL }, {SLE_BOOL, STR_CHEAT_SETUP_PROD, &_cheats.setup_prod.value, &_cheats.setup_prod.been_used, &ClickSetProdCheat }, - {SLE_UINT8, STR_CHEAT_SWITCH_CLIMATE, &_settings_game.game_creation.landscape, &_cheats.switch_climate.been_used, &ClickChangeClimateCheat }, {SLE_INT32, STR_CHEAT_CHANGE_DATE, &_cur_year, &_cheats.change_date.been_used, &ClickChangeDateCheat }, }; @@ -247,10 +225,6 @@ break; } - /* Set correct string for switch climate cheat */ - case STR_CHEAT_SWITCH_CLIMATE: val += STR_CHEAT_SWITCH_CLIMATE_TEMPERATE_LANDSCAPE; - /* FALL THROUGH */ - default: SetDParam(0, val); } break; @@ -292,14 +266,6 @@ width = max(width, GetStringBoundingBox(ce->str).width + 10 + 10); break; - /* Set correct string for switch climate cheat */ - case STR_CHEAT_SWITCH_CLIMATE: - for (StringID i = STR_CHEAT_SWITCH_CLIMATE_TEMPERATE_LANDSCAPE; i <= STR_CHEAT_SWITCH_CLIMATE_TOYLAND_LANDSCAPE; i++) { - SetDParam(0, i); - width = max(width, GetStringBoundingBox(ce->str).width); - } - break; - default: SetDParam(0, INT64_MAX); width = max(width, GetStringBoundingBox(ce->str).width);
--- a/src/cheat_type.h +++ b/src/cheat_type.h @@ -32,10 +32,10 @@ Cheat crossing_tunnels; ///< allow tunnels that cross each other Cheat dummy1; ///< empty cheat (build while in pause mode) Cheat no_jetcrash; ///< no jet will crash on small airports anymore - Cheat switch_climate; ///< change the climate of the map + Cheat dummy2; ///< empty cheat (change the climate of the map) Cheat change_date; ///< changes date ingame Cheat setup_prod; ///< setup raw-material production in game - Cheat dummy2; ///< empty cheat (enable running el-engines on normal rail) + Cheat dummy3; ///< empty cheat (enable running el-engines on normal rail) }; extern Cheats _cheats;
--- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -1465,7 +1465,6 @@ STR_CHEAT_EXTRA_DYNAMITE :{LTBLUE}Magic bulldozer (remove industries, unmovable objects): {ORANGE}{STRING1} STR_CHEAT_CROSSINGTUNNELS :{LTBLUE}Tunnels may cross each other: {ORANGE}{STRING1} STR_CHEAT_NO_JETCRASH :{LTBLUE}Jetplanes will not crash (frequently) on small airports: {ORANGE}{STRING} -STR_CHEAT_SWITCH_CLIMATE :{LTBLUE}Switch climate: {ORANGE}{STRING} STR_CHEAT_SWITCH_CLIMATE_TEMPERATE_LANDSCAPE :Temperate landscape STR_CHEAT_SWITCH_CLIMATE_SUB_ARCTIC_LANDSCAPE :Sub-arctic landscape STR_CHEAT_SWITCH_CLIMATE_SUB_TROPICAL_LANDSCAPE :Sub-tropical landscape