1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-10 06:52:05 +01:00

Add: Game units for height. (#14615)

This commit is contained in:
Rito12
2025-10-24 22:25:16 +02:00
committed by GitHub
parent 2212169a8c
commit 6ebe64703f
3 changed files with 5 additions and 2 deletions

View File

@@ -254,6 +254,7 @@ STR_UNITS_FORCE_SI :{DECIMAL}{NBSP}
STR_UNITS_HEIGHT_IMPERIAL :{DECIMAL}{NBSP}ft
STR_UNITS_HEIGHT_METRIC :{DECIMAL}{NBSP}m
STR_UNITS_HEIGHT_SI :{DECIMAL}{NBSP}m
STR_UNITS_HEIGHT_GAMEUNITS :{DECIMAL}{NBSP}level{P "" s}
# Time units used in string control characters
STR_UNITS_DAYS :{COMMA}{NBSP}day{P "" s}
@@ -2158,10 +2159,11 @@ STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_SI :SI (kN)
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT :Heights units: {STRING2}
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_HELPTEXT :Whenever a height is shown in the user interface, show it in the selected units
###length 3
###length 4
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_IMPERIAL :Imperial (ft)
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_METRIC :Metric (m)
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_SI :SI (m)
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_GAMEUNITS :Game units (levels)
STR_CONFIG_SETTING_LOCALISATION :Localisation
STR_CONFIG_SETTING_GRAPHICS :Graphics

View File

@@ -916,6 +916,7 @@ static const Units _units_height[] = {
{ { 3.0 }, STR_UNITS_HEIGHT_IMPERIAL, 0 }, // "Wrong" conversion factor for more nicer GUI values
{ { 1.0 }, STR_UNITS_HEIGHT_METRIC, 0 },
{ { 1.0 }, STR_UNITS_HEIGHT_SI, 0 },
{ { .02 }, STR_UNITS_HEIGHT_GAMEUNITS,0 },
};
/** Unit conversions for time in calendar days or wallclock seconds */

View File

@@ -163,7 +163,7 @@ type = SLE_UINT8
from = SLV_184
flags = SettingFlag::NoNetworkSync, SettingFlag::GuiDropdown
def = 1
max = 2
max = 3
full = _locale_units
post_cb = [](auto) { MarkWholeScreenDirty(); }
cat = SC_BASIC