Codechange: merge guiflags and flags in settings .ini files
It was rather confusing which one was for what, especially as some SaveLoad flags were settings-only. Clean up this mess a bit by having only Setting flags.
This commit is contained in:
committed by
Patric Stout
parent
264991dfa5
commit
648ee88a02
@@ -16,15 +16,14 @@ static const SettingTable _company_settings{
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(CompanySettings, $var, $flags, $guiflags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(CompanySettings, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(CompanySettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(CompanySettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for CompanySettings.$var exceeds storage size");
|
||||
|
||||
[defaults]
|
||||
flags = 0
|
||||
guiflags = SF_PER_COMPANY
|
||||
flags = SF_PER_COMPANY
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
@@ -50,7 +49,7 @@ cat = SC_BASIC
|
||||
[SDT_VAR]
|
||||
var = engine_renew_months
|
||||
type = SLE_INT16
|
||||
guiflags = SF_PER_COMPANY | SF_GUI_NEGATIVE_IS_SPECIAL
|
||||
flags = SF_PER_COMPANY | SF_GUI_NEGATIVE_IS_SPECIAL
|
||||
def = 6
|
||||
min = -12
|
||||
max = 12
|
||||
@@ -61,7 +60,7 @@ strval = STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_BEFORE
|
||||
[SDT_VAR]
|
||||
var = engine_renew_money
|
||||
type = SLE_UINT
|
||||
guiflags = SF_PER_COMPANY | SF_GUI_CURRENCY
|
||||
flags = SF_PER_COMPANY | SF_GUI_CURRENCY
|
||||
def = 100000
|
||||
min = 0
|
||||
max = 2000000
|
||||
@@ -83,7 +82,7 @@ post_cb = UpdateServiceInterval
|
||||
[SDT_VAR]
|
||||
var = vehicle.servint_trains
|
||||
type = SLE_UINT16
|
||||
guiflags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL
|
||||
flags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL
|
||||
def = 150
|
||||
min = 5
|
||||
max = 800
|
||||
@@ -96,7 +95,7 @@ post_cb = [](auto new_value) { UpdateServiceInterval(VEH_TRAIN, new_value); }
|
||||
[SDT_VAR]
|
||||
var = vehicle.servint_roadveh
|
||||
type = SLE_UINT16
|
||||
guiflags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL
|
||||
flags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL
|
||||
def = 150
|
||||
min = 5
|
||||
max = 800
|
||||
@@ -109,7 +108,7 @@ post_cb = [](auto new_value) { UpdateServiceInterval(VEH_ROAD, new_value); }
|
||||
[SDT_VAR]
|
||||
var = vehicle.servint_ships
|
||||
type = SLE_UINT16
|
||||
guiflags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL
|
||||
flags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL
|
||||
def = 360
|
||||
min = 5
|
||||
max = 800
|
||||
@@ -122,7 +121,7 @@ post_cb = [](auto new_value) { UpdateServiceInterval(VEH_SHIP, new_value); }
|
||||
[SDT_VAR]
|
||||
var = vehicle.servint_aircraft
|
||||
type = SLE_UINT16
|
||||
guiflags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL
|
||||
flags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL
|
||||
def = 100
|
||||
min = 5
|
||||
max = 800
|
||||
|
||||
@@ -11,15 +11,14 @@ static const SettingTable _currency_settings{
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
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),
|
||||
SDT_VAR = SDT_VAR (CurrencySpec, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_SSTR = SDT_SSTR(CurrencySpec, $var, $type, $flags, $def, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
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
|
||||
guiflags = SF_NONE
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
|
||||
@@ -46,13 +46,13 @@ static const SettingTable _gameopt_settings{
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTG_LIST = SDTG_LIST($name, $type, $flags, $guiflags, $var, $def, $length, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_LIST = SDTG_LIST($name, $type, $flags, $var, $def, $length, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_NULL = SDT_NULL( $length, $from, $to),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $guiflags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@@ -62,8 +62,7 @@ SDT_OMANY = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$va
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
|
||||
|
||||
[defaults]
|
||||
flags = 0
|
||||
guiflags = SF_NONE
|
||||
flags = SF_NONE
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
@@ -84,7 +83,7 @@ name = ""diff_custom""
|
||||
sdt_cmd = SDT_INTLIST
|
||||
sle_cmd = SL_ARR
|
||||
type = SLE_FILE_I16 | SLE_VAR_U16
|
||||
flags = SLF_NOT_IN_CONFIG
|
||||
flags = SF_NOT_IN_CONFIG
|
||||
var = _old_diff_custom
|
||||
length = 17
|
||||
def = nullptr
|
||||
@@ -95,19 +94,18 @@ name = ""diff_custom""
|
||||
sdt_cmd = SDT_INTLIST
|
||||
sle_cmd = SL_ARR
|
||||
type = SLE_UINT16
|
||||
flags = SLF_NOT_IN_CONFIG
|
||||
flags = SF_NOT_IN_CONFIG
|
||||
var = _old_diff_custom
|
||||
length = 18
|
||||
def = nullptr
|
||||
full = nullptr
|
||||
from = SLV_4
|
||||
|
||||
##
|
||||
[SDTG_VAR]
|
||||
name = ""diff_level""
|
||||
var = _old_diff_level
|
||||
type = SLE_UINT8
|
||||
flags = SLF_NOT_IN_CONFIG
|
||||
flags = SF_NOT_IN_CONFIG
|
||||
def = SP_CUSTOM
|
||||
min = SP_EASY
|
||||
max = SP_CUSTOM
|
||||
@@ -116,7 +114,7 @@ cat = SC_BASIC
|
||||
[SDT_OMANY]
|
||||
var = locale.currency
|
||||
type = SLE_UINT8
|
||||
flags = SLF_NO_NETWORK_SYNC
|
||||
flags = SF_NO_NETWORK_SYNC
|
||||
def = 0
|
||||
max = CURRENCY_END - 1
|
||||
full = _locale_currencies
|
||||
@@ -126,7 +124,7 @@ cat = SC_BASIC
|
||||
name = ""units""
|
||||
var = _old_units
|
||||
type = SLE_UINT8
|
||||
flags = SLF_NOT_IN_CONFIG
|
||||
flags = SF_NOT_IN_CONFIG
|
||||
def = 1
|
||||
max = 2
|
||||
full = _locale_units
|
||||
@@ -172,8 +170,7 @@ to = SLV_23
|
||||
[SDTC_OMANY]
|
||||
var = gui.autosave
|
||||
type = SLE_UINT8
|
||||
from = SLV_23
|
||||
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = 1
|
||||
max = 4
|
||||
full = _autosave_interval
|
||||
|
||||
@@ -24,20 +24,19 @@ static const SettingTable _misc_settings{
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTG_LIST = SDTG_LIST($name, $type, $flags, $guiflags, $var, $def, $length, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_MMANY = SDTG_MMANY($name, $type, $flags, $guiflags, $var, $def, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $guiflags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_SSTR = SDTG_SSTR($name, $type, $flags, $guiflags, $var, $def, 0, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_LIST = SDTG_LIST($name, $type, $flags, $var, $def, $length, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_MMANY = SDTG_MMANY($name, $type, $flags, $var, $def, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_SSTR = SDTG_SSTR($name, $type, $flags, $var, $def, 0, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
SDTG_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
|
||||
[defaults]
|
||||
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
guiflags = SF_NONE
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,15 +17,14 @@ static const SettingTable _win32_settings{
|
||||
};
|
||||
#endif /* _WIN32 */
|
||||
[templates]
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
|
||||
[defaults]
|
||||
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
guiflags = SF_NONE
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
|
||||
@@ -13,15 +13,14 @@ static const SettingTable _window_settings{
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(WindowDesc, $var, $flags, $guiflags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(WindowDesc, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(WindowDesc, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(WindowDesc, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for WindowDesc.$var exceeds storage size");
|
||||
|
||||
[defaults]
|
||||
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
guiflags = SF_NONE
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
|
||||
Reference in New Issue
Block a user