summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-02-04 16:07:42 +0000
committerrubidium <rubidium@openttd.org>2011-02-04 16:07:42 +0000
commit773c6765e60e56db4c24c3150de52b18f084637d (patch)
treeab85440111314e33728d44bfcf596eb32a18d134
parentc85d350310d220885e07a5eed327110a4169f56b (diff)
downloadopenttd-773c6765e60e56db4c24c3150de52b18f084637d.tar.xz
(svn r21961) -Remove: limitation that not loading and not unloading is mutual exclusive
-rw-r--r--src/lang/english.txt7
-rw-r--r--src/order_cmd.cpp10
-rw-r--r--src/order_gui.cpp2
3 files changed, 5 insertions, 14 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 56ced0b68..f33056147 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -3251,9 +3251,10 @@ STR_ORDER_TRANSFER :(Transfer and t
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]
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 6ae43c3e2..fb7053822 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -622,9 +622,6 @@ CommandCost CmdInsertOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
/* 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 @@ CommandCost CmdModifyOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
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: {
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index e5b49fadf..391821796 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -88,7 +88,7 @@ static const StringID _station_load_types[][5] = {
INVALID_STRING_ID,
STR_ORDER_NO_UNLOAD_FULL_LOAD,
STR_ORDER_NO_UNLOAD_FULL_LOAD_ANY,
- INVALID_STRING_ID,
+ STR_ORDER_NO_UNLOAD_NO_LOAD,
}
};