Class SettingsLoader
- Namespace
- ContentSettings.API
- Assembly
- RedstoneWizard08.ContentLibrary.dll
Settings loader for custom settings belonging to mods.
[Obsolete]
public static class SettingsLoader
- Inheritance
-
SettingsLoader
- Inherited Members
Properties
Settings
Gets all registered settings.
[UsedImplicitly]
public static IEnumerable<Setting> Settings { get; }
Property Value
Methods
GetSetting<T>()
Get the instance of the specified setting.
public static T? GetSetting<T>() where T : Setting
Returns
- T
The instance of the setting.
Type Parameters
TThe type of the setting to get.
HasTab(string)
Returns whether the settings manager has a tab.
[UsedImplicitly]
public static bool HasTab(string tab)
Parameters
tabstringThe tab to check for.
Returns
- bool
True if the settings manager has the tab; otherwise, false.
RegisterSetting(string, string?, Setting)
Register a custom setting.
[Obsolete]
[UsedImplicitly]
public static void RegisterSetting(string tab, string? category, Setting setting)
Parameters
tabstringThe tab to register the setting to.
categorystringThe category of the setting.
settingSettingThe setting to register.
Remarks
This will apply the value of the setting immediately. See ApplyValue().
RegisterSetting(string, Setting)
Register a custom setting to the provided tab without a category.
[Obsolete]
[UsedImplicitly]
public static void RegisterSetting(string tab, Setting setting)
Parameters
RegisterSetting(Setting)
Register a custom setting to the default MODDED tab and empty category.
[Obsolete]
[UsedImplicitly]
public static void RegisterSetting(Setting setting)
Parameters
settingSettingThe setting to register.
TryGetTab(string, out Dictionary<string, List<Setting>>)
Gets the settings for the specified tab.
public static bool TryGetTab(string tab, out Dictionary<string, List<Setting>> settingsByCategory)
Parameters
tabstringThe tab to get the settings for.
settingsByCategoryDictionary<string, List<Setting>>The settings by category for the tab, if found.
Returns
- bool
True if the tab was found; otherwise, false.