From f9c9ff6ec3754ae7d36c64bff0a13bf8bda80bd8 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 29 Jun 2013 09:47:18 +0000 Subject: (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) --- src/table/gameopt_settings.ini | 10 ++-- src/table/settings.ini | 102 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 106 insertions(+), 6 deletions(-) (limited to 'src/table') diff --git a/src/table/gameopt_settings.ini b/src/table/gameopt_settings.ini index 42f906d32..baf7c3542 100644 --- a/src/table/gameopt_settings.ini +++ b/src/table/gameopt_settings.ini @@ -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 diff --git a/src/table/settings.ini b/src/table/settings.ini index 70363b600..0b723a0ae 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -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,17 +2326,114 @@ full = _locale_currencies proc = RedrawScreen cat = SC_BASIC +[SDTG_OMANY] +name = ""units"" +var = _old_units +type = SLE_UINT8 +from = 97 +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 +var = locale.units_velocity type = SLE_UINT8 -from = 97 +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 -- cgit v1.2.3-70-g09d2