Add setting for whether to hide default stop location
This commit is contained in:
@@ -325,6 +325,9 @@ STR_CONFIG_SETTING_SHOW_VEHICLE_GROUP_HIERARCHY_NAME_HELPTEXT :When enabled, a
|
||||
STR_CONFIG_SETTING_SHOW_ORDER_NUMBER_IN_VEHICLE_VIEW :Show order number in vehicle view window: {STRING2}
|
||||
STR_CONFIG_SETTING_SHOW_ORDER_NUMBER_IN_VEHICLE_VIEW_HELPTEXT :When enabled, the current vehicle order is shown in the vehicle view window start/stop bar
|
||||
|
||||
STR_CONFIG_SETTING_HIDE_DEFAULT_STOP_LOCATION :Hide default order stop locations: {STRING2}
|
||||
STR_CONFIG_SETTING_HIDE_DEFAULT_STOP_LOCATION_HELPTEXT :When enabled, hide the order stop location when it matches the default.
|
||||
|
||||
STR_CONFIG_SETTING_ADV_SIG_BRIDGE_TUN_MODES :Enable signals on bridges/tunnels advanced modes: {STRING2}
|
||||
STR_CONFIG_SETTING_ADV_SIG_BRIDGE_TUN_MODES_HELPTEXT :Enables use of advanced modes of signal simulation on bridges and tunnels. When disabled, bridges/tunnels which are not already in an advanced mode cannot be changed to an advanced mode, however other players may choose to enable this setting and use an advanced mode.
|
||||
|
||||
|
@@ -917,7 +917,7 @@ void DrawOrderString(const Vehicle *v, const Order *order, int order_index, int
|
||||
}
|
||||
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)) {
|
||||
if (!_settings_client.gui.hide_default_stop_location || order->GetStopLocation() != (OrderStopLocation)(_settings_client.gui.stop_location)) {
|
||||
SetDParam(7, order->GetStopLocation() + STR_ORDER_STOP_LOCATION_NEAR_END);
|
||||
} else {
|
||||
SetDParam(7, STR_EMPTY);
|
||||
|
@@ -2088,6 +2088,7 @@ static SettingsContainer &GetSettingsTree()
|
||||
vehicle_windows->Add(new ConditionallyHiddenSettingEntry("gui.show_vehicle_group_hierarchy_name", []() -> bool { return !_settings_client.gui.show_group_hierarchy_name; }));
|
||||
vehicle_windows->Add(new SettingEntry("gui.enable_single_veh_shared_order_gui"));
|
||||
vehicle_windows->Add(new SettingEntry("gui.show_order_number_vehicle_view"));
|
||||
vehicle_windows->Add(new SettingEntry("gui.hide_default_stop_location"));
|
||||
}
|
||||
|
||||
SettingsPage *departureboards = interface->Add(new SettingsPage(STR_CONFIG_SETTING_INTERFACE_DEPARTUREBOARDS));
|
||||
|
@@ -286,6 +286,7 @@ struct GUISettings : public TimeSettings {
|
||||
bool show_group_hierarchy_name; ///< Show the full hierarchy in group names
|
||||
bool show_vehicle_group_hierarchy_name;///< Show the full group hierarchy in vehicle names
|
||||
bool show_order_number_vehicle_view; ///< Show order number in vehicle view window
|
||||
bool hide_default_stop_location; ///< Hide default stop location for orders
|
||||
|
||||
uint16 console_backlog_timeout; ///< the minimum amount of time items should be in the console backlog before they will be removed in ~3 seconds granularity.
|
||||
uint16 console_backlog_length; ///< the minimum amount of items in the console backlog before items will be removed.
|
||||
|
@@ -6156,6 +6156,15 @@ strhelp = STR_CONFIG_SETTING_SHOW_ORDER_NUMBER_IN_VEHICLE_VIEW_HELPTEXT
|
||||
patchcat = SC_PATCH
|
||||
post_cb = [](auto) { SetWindowClassesDirty(WC_VEHICLE_VIEW); }
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = gui.hide_default_stop_location
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_HIDE_DEFAULT_STOP_LOCATION
|
||||
strhelp = STR_CONFIG_SETTING_HIDE_DEFAULT_STOP_LOCATION_HELPTEXT
|
||||
patchcat = SC_PATCH
|
||||
post_cb = [](auto) { SetWindowClassesDirty(WC_VEHICLE_ORDERS); }
|
||||
|
||||
; For the dedicated build we'll enable dates in logs by default.
|
||||
[SDTC_BOOL]
|
||||
ifdef = DEDICATED
|
||||
|
Reference in New Issue
Block a user