-
-
Save nielsmh/aaac2c206a30df9f5c2acc6867cc663e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/order_cmd.cpp | |
+++ b/src/order_cmd.cpp | |
@@ -1780,6 +1780,7 @@ void CheckOrders(const Vehicle *v) | |
/* Check the order list */ | |
int n_st = 0; | |
+ bool has_accessible_depot = v->type != VEH_AIRCRAFT; | |
FOR_VEHICLE_ORDERS(v, order) { | |
/* Dummy order? */ | |
@@ -1802,6 +1803,8 @@ void CheckOrders(const Vehicle *v) | |
message == INVALID_STRING_ID) { | |
message = STR_NEWS_PLANE_USES_TOO_SHORT_RUNWAY; | |
} | |
+ | |
+ if (v->type == VEH_AIRCRAFT && st->airport.HasHangar()) has_accessible_depot = true; | |
} | |
} | |
@@ -1817,6 +1820,8 @@ void CheckOrders(const Vehicle *v) | |
/* Do we only have 1 station in our order list? */ | |
if (n_st < 2 && message == INVALID_STRING_ID) message = STR_NEWS_VEHICLE_HAS_TOO_FEW_ORDERS; | |
+ if (!has_accessible_depot && message == INVALID_STRING_ID) message = STR_NEWS_VEHICLE_CAN_NOT_BE_SERVICED_ANYWHERE; /// TODO: add string to english.txt | |
+ | |
#ifndef NDEBUG | |
if (v->orders.list != NULL) v->orders.list->DebugCheckSanity(); | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment