diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-29 09:12:11 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-29 10:32:32 +0200 |
commit | 4c0e083128a4e9c3eefefaab70648057bd1d9fb2 (patch) | |
tree | 0600dc53d8d3b46f563880ca1b750acf7cdf06cd /src/table/currency_settings.ini | |
parent | 4144e949edf3b14c2d478aa0fcba1996942a03fa (diff) | |
download | openttd-4c0e083128a4e9c3eefefaab70648057bd1d9fb2.tar.xz |
Cleanup: set the base in the setting templates, instead of defining the base for every setting
This has the added benefit of not getting mistaken that multiple bases can be used for the same SettingTable
Diffstat (limited to 'src/table/currency_settings.ini')
-rw-r--r-- | src/table/currency_settings.ini | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/table/currency_settings.ini b/src/table/currency_settings.ini index 449bbee98..ce0213758 100644 --- a/src/table/currency_settings.ini +++ b/src/table/currency_settings.ini @@ -9,11 +9,11 @@ static const SettingTable _currency_settings{ [post-amble] }; [templates] -SDT_VAR = SDT_VAR ($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup), -SDT_SSTR = SDT_SSTR($base, $var, $type, $flags, $guiflags, $def, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup), +SDT_VAR = SDT_VAR (CurrencySpec, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup), +SDT_SSTR = SDT_SSTR(CurrencySpec, $var, $type, $flags, $guiflags, $def, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup), [validation] -SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for $base.$var exceeds storage size"); +SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for CurrencySpec.$var exceeds storage size"); [defaults] flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC @@ -34,7 +34,6 @@ startup = false [SDT_VAR] -base = CurrencySpec var = rate type = SLE_UINT16 def = 1 @@ -42,14 +41,12 @@ min = 0 max = UINT16_MAX [SDT_SSTR] -base = CurrencySpec var = separator type = SLE_STRQ def = ""."" cat = SC_BASIC [SDT_VAR] -base = CurrencySpec var = to_euro type = SLE_INT32 def = 0 @@ -57,13 +54,11 @@ min = MIN_YEAR max = MAX_YEAR [SDT_SSTR] -base = CurrencySpec var = prefix type = SLE_STRQ def = nullptr [SDT_SSTR] -base = CurrencySpec var = suffix type = SLE_STRQ def = "" credits"" |