mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Change: Only show platform stopping location in orders when other than default (#11102)
This commit is contained in:
parent
536d2cb75b
commit
f57296a033
@ -1383,7 +1383,7 @@ STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT :New orders are
|
|||||||
STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT_HELPTEXT :Normally, a vehicle will stop at every station it passes. By enabling this setting, it will drive through all station on the way to its final destination without stopping. Note, that this setting only defines a default value for new orders. Individual orders can be set explicitly to either behaviour nevertheless
|
STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT_HELPTEXT :Normally, a vehicle will stop at every station it passes. By enabling this setting, it will drive through all station on the way to its final destination without stopping. Note, that this setting only defines a default value for new orders. Individual orders can be set explicitly to either behaviour nevertheless
|
||||||
|
|
||||||
STR_CONFIG_SETTING_STOP_LOCATION :New train orders stop by default at the {STRING2} of the platform
|
STR_CONFIG_SETTING_STOP_LOCATION :New train orders stop by default at the {STRING2} of the platform
|
||||||
STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT :Place where a train will stop at the platform by default. The 'near end' means close to the entry point, 'middle' means in the middle of the platform, and 'far end' means far away from the entry point. Note, that this setting only defines a default value for new orders. Individual orders can be set explicitly to either behaviour nevertheless
|
STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT :Place where a train will stop at the platform by default. The 'near end' means close to the entry point, 'middle' means in the middle of the platform, and 'far end' means far away from the entry point. Note, that this setting only defines a default value for new orders. Individual orders can have their stop location set by clicking on the order text
|
||||||
###length 3
|
###length 3
|
||||||
STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END :near end
|
STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END :near end
|
||||||
STR_CONFIG_SETTING_STOP_LOCATION_MIDDLE :middle
|
STR_CONFIG_SETTING_STOP_LOCATION_MIDDLE :middle
|
||||||
|
@ -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);
|
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) {
|
if (v->type == VEH_TRAIN && (order->GetNonStopType() & ONSF_NO_STOP_AT_DESTINATION_STATION) == 0) {
|
||||||
|
/* 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);
|
SetDParam(5, order->GetStopLocation() + STR_ORDER_STOP_LOCATION_NEAR_END);
|
||||||
|
} else {
|
||||||
|
SetDParam(5, STR_EMPTY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -600,6 +600,7 @@ interval = 1
|
|||||||
str = STR_CONFIG_SETTING_STOP_LOCATION
|
str = STR_CONFIG_SETTING_STOP_LOCATION
|
||||||
strhelp = STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT
|
strhelp = STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT
|
||||||
strval = STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END
|
strval = STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END
|
||||||
|
post_cb = [](auto) { SetWindowClassesDirty(WC_VEHICLE_ORDERS); }
|
||||||
cat = SC_BASIC
|
cat = SC_BASIC
|
||||||
|
|
||||||
[SDTC_BOOL]
|
[SDTC_BOOL]
|
||||||
|
Loading…
Reference in New Issue
Block a user