summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-10 17:23:51 +0000
committerrubidium <rubidium@openttd.org>2008-04-10 17:23:51 +0000
commit4ad8b95dccc6aca8bc10477bce25dd7e676d9a55 (patch)
treea4267fd1d72f67329eb453e9bc4ac543511be188 /src/openttd.cpp
parent3badd389149c4b2fda55d115453067831f9b75a8 (diff)
downloadopenttd-4ad8b95dccc6aca8bc10477bce25dd7e676d9a55.tar.xz
(svn r12652) -Codechange: rework the order GUI a little more to make it a little more clear that 'transfer' is just an unload type.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 52fed7da1..25798c486 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -2452,6 +2452,23 @@ bool AfterLoadGame()
Vehicle *v;
FOR_ALL_VEHICLES(v) v->current_order.ConvertFromOldSavegame();
+ } else if (CheckSavegameVersion(94)) {
+ /* Unload and transfer are now mutual exclusive. */
+ Order *order;
+ FOR_ALL_ORDERS(order) {
+ if ((order->GetUnloadType() & (OUFB_UNLOAD | OUFB_TRANSFER)) == (OUFB_UNLOAD | OUFB_TRANSFER)) {
+ order->SetUnloadType(OUFB_TRANSFER);
+ order->SetLoadType(OLFB_NO_LOAD);
+ }
+ }
+
+ Vehicle *v;
+ FOR_ALL_VEHICLES(v) {
+ if ((v->current_order.GetUnloadType() & (OUFB_UNLOAD | OUFB_TRANSFER)) == (OUFB_UNLOAD | OUFB_TRANSFER)) {
+ v->current_order.SetUnloadType(OUFB_TRANSFER);
+ v->current_order.SetLoadType(OLFB_NO_LOAD);
+ }
+ }
}
return InitializeWindowsAndCaches();