diff options
author | rubidium <rubidium@openttd.org> | 2008-04-10 17:23:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-10 17:23:51 +0000 |
commit | ba0a5814c2f36f6dca68d094882e5240b7635b74 (patch) | |
tree | a4267fd1d72f67329eb453e9bc4ac543511be188 /src/openttd.cpp | |
parent | 63116691a9ff1eaa541a350fcd11a474dac4a095 (diff) | |
download | openttd-ba0a5814c2f36f6dca68d094882e5240b7635b74.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.cpp | 17 |
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(); |