Mercurial > hg > openttd
changeset 17222:c3be3dde0adb draft
(svn r21961) -Remove: limitation that not loading and not unloading is mutual exclusive
author | rubidium <rubidium@openttd.org> |
---|---|
date | Fri, 04 Feb 2011 16:07:42 +0000 |
parents | edf36d7f3f86 |
children | a1dda316ecbe |
files | src/lang/english.txt src/order_cmd.cpp src/order_gui.cpp |
diffstat | 3 files changed, 5 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -3251,9 +3251,10 @@ STR_ORDER_TRANSFER_FULL_LOAD :(Transfer and wait for full load) STR_ORDER_TRANSFER_FULL_LOAD_ANY :(Transfer and wait for any full load) STR_ORDER_TRANSFER_NO_LOAD :(Transfer and leave empty) -STR_ORDER_NO_UNLOAD :(No unload and take cargo) -STR_ORDER_NO_UNLOAD_FULL_LOAD :(No unload and wait for full load) -STR_ORDER_NO_UNLOAD_FULL_LOAD_ANY :(No unload and wait for any full load) +STR_ORDER_NO_UNLOAD :(No unloading and take cargo) +STR_ORDER_NO_UNLOAD_FULL_LOAD :(No unloading and wait for full load) +STR_ORDER_NO_UNLOAD_FULL_LOAD_ANY :(No unloading and wait for any full load) +STR_ORDER_NO_UNLOAD_NO_LOAD :(No unloading and no loading) STR_ORDER_STOP_LOCATION_NEAR_END :[near end] STR_ORDER_STOP_LOCATION_MIDDLE :[middle]
--- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -622,9 +622,6 @@ /* Non stop only allowed for ground vehicles. */ if (new_order.GetNonStopType() != ONSF_STOP_EVERYWHERE && !v->IsGroundVehicle()) return CMD_ERROR; - /* No load and no unload are mutual exclusive. */ - if ((new_order.GetLoadType() & OLFB_NO_LOAD) && (new_order.GetUnloadType() & OUFB_NO_UNLOAD)) return CMD_ERROR; - /* Filter invalid load/unload types. */ switch (new_order.GetLoadType()) { case OLF_LOAD_IF_POSSIBLE: case OLFB_FULL_LOAD: case OLF_FULL_LOAD_ANY: case OLFB_NO_LOAD: break; @@ -1250,17 +1247,10 @@ case MOF_UNLOAD: order->SetUnloadType((OrderUnloadFlags)data); - if ((data & OUFB_NO_UNLOAD) != 0 && (order->GetLoadType() & OLFB_NO_LOAD) != 0) { - order->SetLoadType((OrderLoadFlags)(order->GetLoadType() & ~OLFB_NO_LOAD)); - } break; case MOF_LOAD: order->SetLoadType((OrderLoadFlags)data); - if ((data & OLFB_NO_LOAD) != 0 && (order->GetUnloadType() & OUFB_NO_UNLOAD) != 0) { - /* No load + no unload isn't compatible */ - order->SetUnloadType((OrderUnloadFlags)(order->GetUnloadType() & ~OUFB_NO_UNLOAD)); - } break; case MOF_DEPOT_ACTION: {