config entries can now be arrays, values of which are governed by several different Settings.
Summary:
Changes to the OptionsPanel prefab - the OptionTabs section is now GridLayoutGroup instead of HorizontalLayoutGroup, accommodating place for more [mod-defined] option tabs.
Along with that had to slightly change the size of the options background image (so the footer always fits), and along with that had to slightly change the size of of the Options panel in S4Tabletop, so it won't cover "Modal" image. The changes are nigh-imperceptible.
To complement the ability to ignore certain content (introduced in 'Mod support essential fixes' pull request), more fleshed out support of config arrays is added: methods to remove and add to arrays.
Two new properties added to Setting entity - TargetConfigArray and ValueInnerLabels.
TargetConfigArray, if not empty, allows several different Setting enities to write their values into the same config.ini entry (values are separated by commas). Ie. each Setting with { "targetConfigArray": "IgnoredContent" } will add its value to the "IgnoredContent" config entry. This behaviour is implemented in the new SettingArrayObserverForConfig class.
ValueInnerLabels are the same thing as the already existing "ValueLabels" property - ie allows to associate strings with Setting values - but intended for the inner tech purposes instead of UI. "Labelled" value can be retrieved via GetInnerLabelForValue().
Since mod-defined Settings - especially arrays - can become a chaotic subject, a method that removes entries from config.ini is introduced. When empty, arrays and array-related configs automatically excuse themselves out of the ini file.
tl;dr:
Summary:
Changes to the OptionsPanel prefab - the OptionTabs section is now GridLayoutGroup instead of HorizontalLayoutGroup, accommodating place for more [mod-defined] option tabs.
To complement the ability to ignore certain content (introduced in 'Mod support essential fixes' pull request), more fleshed out support of config arrays is added: methods to remove and add to arrays.
Two new properties added to Setting entity - TargetConfigArray and ValueInnerLabels.
Since mod-defined Settings - especially arrays - can become a chaotic subject, a method that removes entries from config.ini is introduced. When empty, arrays and array-related configs automatically excuse themselves out of the ini file.