diff --git a/src/lang/english.txt b/src/lang/english.txt index c92d03cb62..52b10d8d11 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -4021,6 +4021,7 @@ STR_ORDER_REFIT_STOP_ORDER :(Refit to {STRI STR_ORDER_STOP_ORDER :(Stop) STR_ORDER_GO_TO_STATION :{STRING} {STATION} {STRING1} +STR_ORDER_GO_TO_STATION_CAN_T_USE_STATION :{PUSH_COLOUR}{RED}(Can't use station){POP_COLOUR} {STRING} {STATION} {STRING1} STR_ORDER_IMPLICIT :(Implicit) diff --git a/src/order_gui.cpp b/src/order_gui.cpp index d26d00278a..d3b4aa9527 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -28,6 +28,7 @@ #include "hotkeys.h" #include "aircraft.h" #include "engine_func.h" +#include "vehicle_func.h" #include "widgets/order_widget.h" @@ -258,8 +259,9 @@ void DrawOrderString(const Vehicle *v, const Order *order, int order_index, int case OT_GOTO_STATION: { OrderLoadFlags load = order->GetLoadType(); OrderUnloadFlags unload = order->GetUnloadType(); + bool valid_station = CanVehicleUseStation(v, Station::Get(order->GetDestination())); - SetDParam(0, STR_ORDER_GO_TO_STATION); + SetDParam(0, valid_station ? STR_ORDER_GO_TO_STATION : STR_ORDER_GO_TO_STATION_CAN_T_USE_STATION); SetDParam(1, STR_ORDER_GO_TO + (v->IsGroundVehicle() ? order->GetNonStopType() : 0)); SetDParam(2, order->GetDestination());