(svn r25508) -Change: split unit localisation choice into a choice per type of unit, and move it to the advanced settings
-Feature [FS#5482]: have tractive effort in imperial (lbf) and metric (kgf) units -Feature: have weights and volumes in imperial units (short tons, gallons)
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
static const uint GAME_DIFFICULTY_NUM = 18;
|
||||
static uint16 _old_diff_custom[GAME_DIFFICULTY_NUM];
|
||||
uint8 _old_diff_level; ///< Old difficulty level from old savegames
|
||||
uint8 _old_units; ///< Old units from old savegames
|
||||
|
||||
/* Most of these strings are used both for gameopt-backward compatability
|
||||
* and the settings tables. The rest is here for consistency. */
|
||||
@@ -44,6 +45,7 @@ SDTG_GENERAL = SDTG_GENERAL($name, $sdt_cmd, $sle_cmd, $type, $flags, $guiflags,
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDT_NULL = SDT_NULL($length, $from, $to),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $guiflags, $var, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDT_OMANY = SDT_OMANY($base, $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $load, $cat),
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDT_END = SDT_END()
|
||||
@@ -112,11 +114,11 @@ max = CURRENCY_END - 1
|
||||
full = _locale_currencies
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
var = locale.units
|
||||
[SDTG_OMANY]
|
||||
name = ""units""
|
||||
var = _old_units
|
||||
type = SLE_UINT8
|
||||
flags = SLF_NO_NETWORK_SYNC
|
||||
flags = SLF_NOT_IN_CONFIG
|
||||
def = 1
|
||||
max = 2
|
||||
full = _locale_units
|
||||
|
@@ -64,6 +64,7 @@ const SettingDesc _settings[] = {
|
||||
[templates]
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $guiflags, $var, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDTC_LIST = SDTC_LIST( $var, $type, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat),
|
||||
@@ -2325,18 +2326,115 @@ full = _locale_currencies
|
||||
proc = RedrawScreen
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
var = locale.units
|
||||
[SDTG_OMANY]
|
||||
name = ""units""
|
||||
var = _old_units
|
||||
type = SLE_UINT8
|
||||
from = 97
|
||||
flags = SLF_NO_NETWORK_SYNC
|
||||
to = 183
|
||||
flags = SLF_NOT_IN_CONFIG
|
||||
def = 1
|
||||
max = 2
|
||||
full = _locale_units
|
||||
proc = RedrawScreen
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
var = locale.units_velocity
|
||||
type = SLE_UINT8
|
||||
from = 184
|
||||
flags = SLF_NO_NETWORK_SYNC
|
||||
guiflags = SGF_MULTISTRING
|
||||
def = 1
|
||||
max = 2
|
||||
full = _locale_units
|
||||
proc = RedrawScreen
|
||||
cat = SC_BASIC
|
||||
str = STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY
|
||||
strhelp = STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_IMPERIAL
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
var = locale.units_power
|
||||
type = SLE_UINT8
|
||||
from = 184
|
||||
flags = SLF_NO_NETWORK_SYNC
|
||||
guiflags = SGF_MULTISTRING
|
||||
def = 1
|
||||
max = 2
|
||||
full = _locale_units
|
||||
proc = RedrawScreen
|
||||
cat = SC_BASIC
|
||||
str = STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER
|
||||
strhelp = STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_IMPERIAL
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
var = locale.units_weight
|
||||
type = SLE_UINT8
|
||||
from = 184
|
||||
flags = SLF_NO_NETWORK_SYNC
|
||||
guiflags = SGF_MULTISTRING
|
||||
def = 1
|
||||
max = 2
|
||||
full = _locale_units
|
||||
proc = RedrawScreen
|
||||
cat = SC_BASIC
|
||||
str = STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT
|
||||
strhelp = STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_IMPERIAL
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
var = locale.units_volume
|
||||
type = SLE_UINT8
|
||||
from = 184
|
||||
flags = SLF_NO_NETWORK_SYNC
|
||||
guiflags = SGF_MULTISTRING
|
||||
def = 1
|
||||
max = 2
|
||||
full = _locale_units
|
||||
proc = RedrawScreen
|
||||
cat = SC_BASIC
|
||||
str = STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME
|
||||
strhelp = STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_IMPERIAL
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
var = locale.units_force
|
||||
type = SLE_UINT8
|
||||
from = 184
|
||||
flags = SLF_NO_NETWORK_SYNC
|
||||
guiflags = SGF_MULTISTRING
|
||||
def = 2
|
||||
max = 2
|
||||
full = _locale_units
|
||||
proc = RedrawScreen
|
||||
cat = SC_BASIC
|
||||
str = STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE
|
||||
strhelp = STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_IMPERIAL
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
var = locale.units_height
|
||||
type = SLE_UINT8
|
||||
from = 184
|
||||
flags = SLF_NO_NETWORK_SYNC
|
||||
guiflags = SGF_MULTISTRING
|
||||
def = 1
|
||||
max = 2
|
||||
full = _locale_units
|
||||
proc = RedrawScreen
|
||||
cat = SC_BASIC
|
||||
str = STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT
|
||||
strhelp = STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_IMPERIAL
|
||||
|
||||
[SDT_STR]
|
||||
base = GameSettings
|
||||
var = locale.digit_group_separator
|
||||
|
Reference in New Issue
Block a user