diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index bd1f727ee1..3df4aa8e18 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -746,9 +746,9 @@ CommandCost CmdInsertOrder(DoCommandFlags flags, VehicleID veh, VehicleOrderID s /* Check if we're allowed to have a new unbunching order. */ if (new_order.GetDepotActionType().Test(OrderDepotActionFlag::Unbunch)) { - if (v->HasFullLoadOrder()) return CommandCost(STR_ERROR_CAN_T_ADD_ORDER, STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD); - if (v->HasUnbunchingOrder()) return CommandCost(STR_ERROR_CAN_T_ADD_ORDER, STR_ERROR_UNBUNCHING_ONLY_ONE_ALLOWED); - if (v->HasConditionalOrder()) return CommandCost(STR_ERROR_CAN_T_ADD_ORDER, STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL); + if (v->HasFullLoadOrder()) return CommandCost(STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD); + if (v->HasUnbunchingOrder()) return CommandCost(STR_ERROR_UNBUNCHING_ONLY_ONE_ALLOWED); + if (v->HasConditionalOrder()) return CommandCost(STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL); } break; } diff --git a/src/order_gui.cpp b/src/order_gui.cpp index f5594a6bf7..1aa2f84ab6 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -375,28 +375,6 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile) (_settings_client.gui.new_nonstop && v->IsGroundVehicle()) ? OrderNonStopFlag::NoIntermediate : OrderNonStopFlags{}); if (_ctrl_pressed) { - /* Check to see if we are allowed to make this an unbunching order. */ - bool failed = false; - if (v->HasFullLoadOrder()) { - /* We don't allow unbunching if the vehicle has a full load order. */ - ShowErrorMessage(GetEncodedString(STR_ERROR_CAN_T_INSERT_NEW_ORDER), GetEncodedString(STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD), WL_INFO); - failed = true; - } else if (v->HasUnbunchingOrder()) { - /* Don't allow a new unbunching order if we already have one. */ - ShowErrorMessage(GetEncodedString(STR_ERROR_CAN_T_INSERT_NEW_ORDER), GetEncodedString(STR_ERROR_UNBUNCHING_ONLY_ONE_ALLOWED), WL_INFO); - failed = true; - } else if (v->HasConditionalOrder()) { - /* We don't allow unbunching if the vehicle has a conditional order. */ - ShowErrorMessage(GetEncodedString(STR_ERROR_CAN_T_INSERT_NEW_ORDER), GetEncodedString(STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL), WL_INFO); - failed = true; - } - - /* Return an empty order to bail out. */ - if (failed) { - order.Free(); - return order; - } - /* Now we are allowed to set the action type. */ order.SetDepotActionType(OrderDepotActionFlag::Unbunch); }