Change: Only show platform stopping location in orders when other than default (#11102)

This commit is contained in:
Tyler Trahan
2023-07-29 17:59:02 -04:00
committed by GitHub
parent 536d2cb75b
commit f57296a033
3 changed files with 8 additions and 2 deletions

View File

@@ -287,7 +287,12 @@ void DrawOrderString(const Vehicle *v, const Order *order, int order_index, int
SetDParam(4, order->IsAutoRefit() ? STR_ORDER_AUTO_REFIT_ANY : CargoSpec::Get(order->GetRefitCargo())->name);
}
if (v->type == VEH_TRAIN && (order->GetNonStopType() & ONSF_NO_STOP_AT_DESTINATION_STATION) == 0) {
SetDParam(5, order->GetStopLocation() + STR_ORDER_STOP_LOCATION_NEAR_END);
/* Only show the stopping location if other than the default chosen by the player. */
if (order->GetStopLocation() != (OrderStopLocation)(_settings_client.gui.stop_location)) {
SetDParam(5, order->GetStopLocation() + STR_ORDER_STOP_LOCATION_NEAR_END);
} else {
SetDParam(5, STR_EMPTY);
}
}
}
break;