mirror of https://github.com/OpenTTD/OpenTTD.git
Before it was shown as a normal order, but the vehicle was skipping it. This was rather unclear to the user. Now it is red and contains text with some hints what is going on. The text is prefixed rather than post-fixed, as we have many post-fixes already.
This commit is contained in:
parent
fda1fbf61c
commit
9aa39d0af9
|
@ -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)
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in New Issue