mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
Fix f6dd505
: Remove unneeded error when switching between depot actions
This commit is contained in:
parent
80a704ba11
commit
d0c753465d
@ -5112,7 +5112,6 @@ STR_ERROR_UNBUNCHING_NO_FULL_LOAD :{WHITE}... cann
|
|||||||
STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD :{WHITE}... cannot unbunch a vehicle with a full load order
|
STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD :{WHITE}... cannot unbunch a vehicle with a full load order
|
||||||
STR_ERROR_UNBUNCHING_NO_CONDITIONAL :{WHITE}... cannot use conditional orders when vehicle has an unbunching order
|
STR_ERROR_UNBUNCHING_NO_CONDITIONAL :{WHITE}... cannot use conditional orders when vehicle has an unbunching order
|
||||||
STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL :{WHITE}... cannot unbunch a vehicle with a conditional order
|
STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL :{WHITE}... cannot unbunch a vehicle with a conditional order
|
||||||
STR_ERROR_UNBUNCHING_NO_SERVICE_IF_NEEDED :{WHITE}... vehicle must always visit the depot to unbunch there
|
|
||||||
|
|
||||||
# Autoreplace related errors
|
# Autoreplace related errors
|
||||||
STR_ERROR_TRAIN_TOO_LONG_AFTER_REPLACEMENT :{WHITE}{VEHICLE} is too long after replacement
|
STR_ERROR_TRAIN_TOO_LONG_AFTER_REPLACEMENT :{WHITE}{VEHICLE} is too long after replacement
|
||||||
|
@ -1300,9 +1300,6 @@ CommandCost CmdModifyOrder(DoCommandFlag flags, VehicleID veh, VehicleOrderID se
|
|||||||
|
|
||||||
case MOF_DEPOT_ACTION:
|
case MOF_DEPOT_ACTION:
|
||||||
if (data >= DA_END) return CMD_ERROR;
|
if (data >= DA_END) return CMD_ERROR;
|
||||||
/* The vehicle must always go to the depot (not just if it needs servicing) in order to unbunch there. */
|
|
||||||
if ((data == DA_SERVICE) && (order->GetDepotActionType() & ODATFB_UNBUNCH)) return_cmd_error(STR_ERROR_UNBUNCHING_NO_SERVICE_IF_NEEDED);
|
|
||||||
|
|
||||||
/* Check if we are allowed to add unbunching. We are always allowed to remove it. */
|
/* Check if we are allowed to add unbunching. We are always allowed to remove it. */
|
||||||
if (data == DA_UNBUNCH) {
|
if (data == DA_UNBUNCH) {
|
||||||
/* Only one unbunching order is allowed in a vehicle's orders. If this order already has an unbunching action, no error is needed. */
|
/* Only one unbunching order is allowed in a vehicle's orders. If this order already has an unbunching action, no error is needed. */
|
||||||
@ -1312,8 +1309,6 @@ CommandCost CmdModifyOrder(DoCommandFlag flags, VehicleID veh, VehicleOrderID se
|
|||||||
if (o->IsType(OT_CONDITIONAL)) return_cmd_error(STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL);
|
if (o->IsType(OT_CONDITIONAL)) return_cmd_error(STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL);
|
||||||
/* We don't allow unbunching if the vehicle has a full load order. */
|
/* We don't allow unbunching if the vehicle has a full load order. */
|
||||||
if (o->IsType(OT_GOTO_STATION) && o->GetLoadType() & (OLFB_FULL_LOAD | OLF_FULL_LOAD_ANY)) return_cmd_error(STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD);
|
if (o->IsType(OT_GOTO_STATION) && o->GetLoadType() & (OLFB_FULL_LOAD | OLF_FULL_LOAD_ANY)) return_cmd_error(STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD);
|
||||||
/* The vehicle must always go to the depot (not just if it needs servicing) in order to unbunch there. */
|
|
||||||
if (o->IsType(OT_GOTO_DEPOT) && o->GetDepotOrderType() & ODTFB_SERVICE) return_cmd_error(STR_ERROR_UNBUNCHING_NO_SERVICE_IF_NEEDED);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user