Table of Contents

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

IEnumerable<Setting>

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

T

The type of the setting to get.

HasTab(string)

Returns whether the settings manager has a tab.

[UsedImplicitly]
public static bool HasTab(string tab)

Parameters

tab string

The 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

tab string

The tab to register the setting to.

category string

The category of the setting.

setting Setting

The 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

tab string

The tab to register the setting to.

setting Setting

The setting to register.

RegisterSetting(Setting)

Register a custom setting to the default MODDED tab and empty category.

[Obsolete]
[UsedImplicitly]
public static void RegisterSetting(Setting setting)

Parameters

setting Setting

The 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

tab string

The tab to get the settings for.

settingsByCategory Dictionary<string, List<Setting>>

The settings by category for the tab, if found.

Returns

bool

True if the tab was found; otherwise, false.