mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-21 01:59:44 +00:00
Fix #15318: Nonsensical error message when trying to send aircraft to hangar with no usable airports
This commit is contained in:
@@ -5258,6 +5258,7 @@ STR_ERROR_CAN_T_MOVE_VEHICLE :Can't move vehi
|
||||
STR_ERROR_REAR_ENGINE_FOLLOW_FRONT :the rear engine will always follow its front counterpart
|
||||
STR_ERROR_UNABLE_TO_FIND_ROUTE_TO :unable to find route to local depot
|
||||
STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT :unable to find local depot
|
||||
STR_ERROR_UNABLE_TO_FIND_LOCAL_HANGAR :unable to find local hangar
|
||||
|
||||
STR_ERROR_DEPOT_WRONG_DEPOT_TYPE :wrong depot type
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
ERR_VEHICLE_WRONG_DEPOT, // [STR_ERROR_DEPOT_WRONG_DEPOT_TYPE]
|
||||
|
||||
/** Vehicle can't return to the depot */
|
||||
ERR_VEHICLE_CANNOT_SEND_TO_DEPOT, // [STR_ERROR_CAN_T_SEND_TRAIN_TO_DEPOT, STR_ERROR_CAN_T_SEND_ROAD_VEHICLE_TO_DEPOT, STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT, STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR, STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT]
|
||||
ERR_VEHICLE_CANNOT_SEND_TO_DEPOT, // [STR_ERROR_CAN_T_SEND_TRAIN_TO_DEPOT, STR_ERROR_CAN_T_SEND_ROAD_VEHICLE_TO_DEPOT, STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT, STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR, STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT, STR_ERROR_UNABLE_TO_FIND_LOCAL_HANGAR]
|
||||
|
||||
/** Vehicle can't start / stop */
|
||||
ERR_VEHICLE_CANNOT_START_STOP, // [STR_ERROR_CAN_T_STOP_START_TRAIN, STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE, STR_ERROR_CAN_T_STOP_START_SHIP, STR_ERROR_CAN_T_STOP_START_AIRCRAFT]
|
||||
|
||||
+1
-1
@@ -2639,7 +2639,7 @@ CommandCost Vehicle::SendToDepot(DoCommandFlags flags, DepotCommandFlags command
|
||||
}
|
||||
|
||||
ClosestDepot closest_depot = this->FindClosestDepot();
|
||||
static const StringID no_depot[] = {STR_ERROR_UNABLE_TO_FIND_ROUTE_TO, STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT, STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT, STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR};
|
||||
static const StringID no_depot[] = {STR_ERROR_UNABLE_TO_FIND_ROUTE_TO, STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT, STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT, STR_ERROR_UNABLE_TO_FIND_LOCAL_HANGAR};
|
||||
if (!closest_depot.found) return CommandCost(no_depot[this->type]);
|
||||
|
||||
if (flags.Test(DoCommandFlag::Execute)) {
|
||||
|
||||
Reference in New Issue
Block a user