(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:
rubidium
2013-06-29 09:47:18 +00:00
parent 6e97b7a6e8
commit f9c9ff6ec3
9 changed files with 270 additions and 111 deletions

View File

@@ -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