IValueModSettingBase
The non-generic face of a value setting: string in, string out.
public interface IValueModSettingBase : IModSettingThe non-generic face of a value setting, for code that handles settings without knowing their value type: string in, string out, through the type's registered parser and formatter.
Implements: IModSetting
Derived: ISelectorSettingBase · ISliderSettingBase · ISwitchSettingBase · IValueModSetting<T>
Methods
SetSettingValueFromString(String)
void SetSettingValueFromString(string raw);Parses raw with the value type's parser and assigns the applied value. An unparseable string is logged and the value is left unchanged.
SetDefaultValueFromString(String)
void SetDefaultValueFromString(string raw);Parses raw and assigns the default value. Same failure handling.
SetSelectedValueFromString(String)
void SetSelectedValueFromString(string raw);Parses raw and assigns the selected value. Same failure handling.
GetUiFormattedSettingValue()
string GetUiFormattedSettingValue();Returns the applied value as the player sees it: formatted with the UI formatter, prefixed with the localization prefix and passed through Localization.Get.
GetFormattedSelectedValue()
string GetFormattedSelectedValue();Returns the selected value as the player sees it.
GetSerializedFormattedSettingValue()
string GetSerializedFormattedSettingValue();Returns the applied value as written to the saved settings file and returned by modsetting(): formatted with the serialization formatter, no localization.