Changeset - r27758:234bfd78f997
[Not reviewed]
master
0 3 0
Tyler Trahan - 11 months ago 2023-07-29 21:59:02
tyler@tylertrahan.com
Change: Only show platform stopping location in orders when other than default (#11102)
3 files changed with 8 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/lang/english.txt
Show inline comments
 
@@ -1383,7 +1383,7 @@ STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT   
 
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_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
 
STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END                       :near end
 
STR_CONFIG_SETTING_STOP_LOCATION_MIDDLE                         :middle
src/order_gui.cpp
Show inline comments
 
@@ -287,7 +287,12 @@ void DrawOrderString(const Vehicle *v, c
 
					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;
src/table/settings/gui_settings.ini
Show inline comments
 
@@ -600,6 +600,7 @@ interval = 1
 
str      = STR_CONFIG_SETTING_STOP_LOCATION
 
strhelp  = STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT
 
strval   = STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END
 
post_cb  = [](auto) { SetWindowClassesDirty(WC_VEHICLE_ORDERS); }
 
cat      = SC_BASIC
 

	
 
[SDTC_BOOL]
0 comments (0 inline, 0 general)