summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-01-04 22:50:09 +0000
committerrubidium <rubidium@openttd.org>2011-01-04 22:50:09 +0000
commiteab47d2227bad950dd04ab8498588d40f1f4f725 (patch)
tree190356576f6e488e9be4f5810654c8c8ed329a12 /src/saveload
parent7dafd04f4b867243e2b0a67f8e41d2c9c7047a5b (diff)
downloadopenttd-eab47d2227bad950dd04ab8498588d40f1f4f725.tar.xz
(svn r21728) -Fix/Feature [FS#4331]: (configurably) limit amount of tiles that can be cleared/terraformed by a company
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp7
-rw-r--r--src/saveload/company_sl.cpp3
-rw-r--r--src/saveload/saveload.cpp3
3 files changed, 12 insertions, 1 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 2ca600c6e..82e360b9c 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2405,6 +2405,13 @@ bool AfterLoadGame()
ClrBit(t->flags, 5);
SetBit(t->vehicle_flags, VF_PATHFINDER_LOST);
}
+
+ /* Introduced terraform/clear limits. */
+ Company *c;
+ FOR_ALL_COMPANIES(c) {
+ c->terraform_limit = _settings_game.construction.terraform_frame_burst << 16;
+ c->clear_limit = _settings_game.construction.clear_frame_burst << 16;
+ }
}
/* Road stops is 'only' updating some caches */
diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp
index 6f2195ba0..f99e104f2 100644
--- a/src/saveload/company_sl.cpp
+++ b/src/saveload/company_sl.cpp
@@ -140,6 +140,9 @@ static const SaveLoad _company_desc[] = {
SLE_CONDNULL(1, 107, 111), ///< is_noai
SLE_CONDNULL(1, 4, 99),
+ SLE_CONDVAR(CompanyProperties, terraform_limit, SLE_UINT32, 156, SL_MAX_VERSION),
+ SLE_CONDVAR(CompanyProperties, clear_limit, SLE_UINT32, 156, SL_MAX_VERSION),
+
SLE_END()
};
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 85a2579c3..3f3d8246c 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -220,8 +220,9 @@
* 153 21263
* 154 21426
* 155 21453
+ * 156 !!TODO!!
*/
-extern const uint16 SAVEGAME_VERSION = 155; ///< Current savegame version of OpenTTD.
+extern const uint16 SAVEGAME_VERSION = 156; ///< Current savegame version of OpenTTD.
SavegameType _savegame_type; ///< type of savegame we are loading