(svn r12652) -Codechange: rework the order GUI a little more to make it a little more clear that 'transfer' is just an unload type.

This commit is contained in:
rubidium
2008-04-10 17:23:51 +00:00
parent 3badd38914
commit 4ad8b95dcc
5 changed files with 70 additions and 71 deletions

View File

@@ -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();