summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2011-02-05 10:28:31 +0000
committeralberth <alberth@openttd.org>2011-02-05 10:28:31 +0000
commitbdf5a1c2f7077323c26e1c99a22dcc80a7b50245 (patch)
tree374e89336ea4abf7bbe1eadf0ca3409287722536 /src/saveload
parent974c0f51662ec15012408cc675437575d946710b (diff)
downloadopenttd-bdf5a1c2f7077323c26e1c99a22dcc80a7b50245.tar.xz
(svn r21969) -Feature: Introduce 'minimal' number of industries as a replacment for the old 'none' setting in the newgame window.
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp8
-rw-r--r--src/saveload/saveload.cpp3
2 files changed, 10 insertions, 1 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index a256087d2..2d428d5ce 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2561,6 +2561,14 @@ bool AfterLoadGame()
_settings_game.pf.reverse_at_signals = IsSavegameVersionBefore(100) || (_settings_game.pf.wait_oneway_signal != 255 && _settings_game.pf.wait_twoway_signal != 255 && _settings_game.pf.wait_for_pbs_path != 255);
}
+ if (IsSavegameVersionBefore(160)) {
+ /* Setting difficulty number_industries other than zero get bumped to +1
+ * since a new option (very low at position1) has been added */
+ if (_settings_game.difficulty.number_industries > 0) {
+ _settings_game.difficulty.number_industries++;
+ }
+ }
+
/* Road stops is 'only' updating some caches */
AfterLoadRoadStops();
AfterLoadLabelMaps();
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 9d22150ad..65a68ec2a 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -224,8 +224,9 @@
* 157 21862
* 158 21933
* 159 21962
+ * 160 21968
*/
-extern const uint16 SAVEGAME_VERSION = 159; ///< Current savegame version of OpenTTD.
+extern const uint16 SAVEGAME_VERSION = 160; ///< Current savegame version of OpenTTD.
SavegameType _savegame_type; ///< type of savegame we are loading