|
@@ -203,97 +203,97 @@ void DrawOrderString(const Vehicle *v, c
|
|
|
}
|
|
|
} else {
|
|
|
SetDParam(4, (order->GetNonStopType() & ONSF_NO_STOP_AT_DESTINATION_STATION) ? STR_EMPTY : _station_load_types[unload][load]);
|
|
|
if (v->type == VEH_TRAIN && (order->GetNonStopType() & ONSF_NO_STOP_AT_DESTINATION_STATION) == 0) {
|
|
|
SetDParam(6, order->GetStopLocation() + STR_ORDER_STOP_LOCATION_NEAR_END);
|
|
|
}
|
|
|
}
|
|
|
} break;
|
|
|
|
|
|
case OT_GOTO_DEPOT:
|
|
|
if (v->type == VEH_AIRCRAFT) {
|
|
|
if (order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) {
|
|
|
SetDParam(1, STR_GO_TO_NEAREST_DEPOT);
|
|
|
SetDParam(3, STR_ORDER_NEAREST_HANGAR);
|
|
|
} else {
|
|
|
SetDParam(1, STR_GO_TO_HANGAR);
|
|
|
SetDParam(3, order->GetDestination());
|
|
|
}
|
|
|
SetDParam(4, STR_EMPTY);
|
|
|
} else {
|
|
|
if (order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) {
|
|
|
SetDParam(1, STR_GO_TO_NEAREST_DEPOT);
|
|
|
SetDParam(3, STR_ORDER_NEAREST_DEPOT);
|
|
|
} else {
|
|
|
SetDParam(1, STR_GO_TO_DEPOT);
|
|
|
SetDParam(3, Depot::Get(order->GetDestination())->town_index);
|
|
|
}
|
|
|
|
|
|
switch (v->type) {
|
|
|
case VEH_TRAIN: SetDParam(4, STR_ORDER_TRAIN_DEPOT); break;
|
|
|
case VEH_ROAD: SetDParam(4, STR_ORDER_ROAD_DEPOT); break;
|
|
|
case VEH_SHIP: SetDParam(4, STR_ORDER_SHIP_DEPOT); break;
|
|
|
default: NOT_REACHED();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (order->GetDepotOrderType() & ODTFB_SERVICE) {
|
|
|
SetDParam(2, (order->GetNonStopType() & ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS) ? STR_ORDER_SERVICE_NON_STOP_AT : STR_ORDER_SERVICE_AT);
|
|
|
} else {
|
|
|
SetDParam(2, (order->GetNonStopType() & ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS) ? STR_ORDER_GO_NON_STOP_TO : STR_ORDER_GO_TO);
|
|
|
}
|
|
|
|
|
|
if (!timetable && (order->GetDepotActionType() & ODATFB_HALT)) {
|
|
|
SetDParam(6, STR_STOP_ORDER);
|
|
|
}
|
|
|
|
|
|
if (!timetable && order->IsRefit()) {
|
|
|
SetDParam(6, (order->GetDepotActionType() & ODATFB_HALT) ? STR_REFIT_STOP_ORDER : STR_REFIT_ORDER);
|
|
|
SetDParam(7, GetCargo(order->GetRefitCargo())->name);
|
|
|
SetDParam(7, CargoSpec::Get(order->GetRefitCargo())->name);
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
case OT_GOTO_WAYPOINT:
|
|
|
if (v->type == VEH_TRAIN) {
|
|
|
SetDParam(1, (order->GetNonStopType() & ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS) ? STR_GO_NON_STOP_TO_WAYPOINT : STR_GO_TO_WAYPOINT);
|
|
|
SetDParam(2, order->GetDestination());
|
|
|
} else {
|
|
|
SetDParam(1, STR_GO_TO_STATION);
|
|
|
SetDParam(2, STR_ORDER_GO_VIA);
|
|
|
SetDParam(3, order->GetDestination());
|
|
|
SetDParam(4, STR_EMPTY);
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
case OT_CONDITIONAL:
|
|
|
SetDParam(2, order->GetConditionSkipToOrder() + 1);
|
|
|
if (order->GetConditionVariable() == OCV_UNCONDITIONALLY) {
|
|
|
SetDParam(1, STR_CONDITIONAL_UNCONDITIONAL);
|
|
|
} else {
|
|
|
OrderConditionComparator occ = order->GetConditionComparator();
|
|
|
SetDParam(1, (occ == OCC_IS_TRUE || occ == OCC_IS_FALSE) ? STR_CONDITIONAL_TRUE_FALSE : STR_CONDITIONAL_NUM);
|
|
|
SetDParam(3, STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE + order->GetConditionVariable());
|
|
|
SetDParam(4, STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS + occ);
|
|
|
|
|
|
uint value = order->GetConditionValue();
|
|
|
if (order->GetConditionVariable() == OCV_MAX_SPEED) value = ConvertSpeedToDisplaySpeed(value);
|
|
|
SetDParam(5, value);
|
|
|
}
|
|
|
|
|
|
if (timetable && order->wait_time > 0) {
|
|
|
SetDParam(6, STR_TIMETABLE_AND_TRAVEL_FOR);
|
|
|
SetTimetableParams(7, 8, order->wait_time);
|
|
|
} else {
|
|
|
SetDParam(6, STR_EMPTY);
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
default: NOT_REACHED();
|
|
|
}
|
|
|
|
|
|
SetDParam(0, order_index + 1);
|
|
|
DrawString(2, width + 2, y, str, selected ? TC_WHITE : TC_BLACK);
|
|
|
}
|
|
|
|
|
|
|
|
|
static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
|
|
|
{
|