Table of Contents

Class SettingsHelpers

Namespace
MonkeyLoader.Resonite.DataFeeds.Settings
Assembly
MonkeyLoader.Resonite.Integration.dll

Contains helper methods and constants for dynamically creating the MonkeyLoader category in the FrooxEngine.SettingsDataFeed.

public static class SettingsHelpers
Inheritance
SettingsHelpers
Inherited Members

Fields

ConfigKeyChangeLabel

The label used when config keys are set to a new value from the settings.

public const string ConfigKeyChangeLabel = "Settings"

Field Value

string

ConfigSections

The name of the dedicated category under the usual MonkeyLoader/<Mod>/ path that displays only the Config of the Mod or loader.

public const string ConfigSections = "ConfigSections"

Field Value

string

EarlyMonkeys

The name of the dedicated category under the usual MonkeyLoader/<Mod>/ path that displays only the early monkeys of the Mod or loader.

public const string EarlyMonkeys = "EarlyMonkeys"

Field Value

string

MetaData

The name of the dedicated category under the usual MonkeyLoader/<Mod>/ path that displays only the meta data of the Mod or loader.

public const string MetaData = "MetaData"

Field Value

string

MonkeyLoader

The name of the MonkeyLoader category in the FrooxEngine.SettingsDataFeed.
The category under the MonkeyLoader/MonkeyLoader/ path displays the settings and monkeys of the loader.

public const string MonkeyLoader = "MonkeyLoader"

Field Value

string

MonkeyToggles

The name of the dedicated category under the usual MonkeyLoader/<Mod>/ path that displays only the information and toggles for the monkeys of the Mod or loader.

public const string MonkeyToggles = "MonkeyToggles"

Field Value

string

Monkeys

The name of the dedicated category under the usual MonkeyLoader/<Mod>/ path that displays only the regular monkeys of the Mod or loader.

public const string Monkeys = "Monkeys"

Field Value

string

ResetConfig

The name of the pseudo-category under the usual MonkeyLoader/<Mod>/ path that triggers resetting the Config of the Mod or loader.

public const string ResetConfig = "ResetConfig"

Field Value

string

SaveConfig

The name of the pseudo-category under the usual MonkeyLoader/<Mod>/ path that triggers saving the Config of the Mod or loader.

public const string SaveConfig = "SaveConfig"

Field Value

string

Methods

EnumerateMonkeysAsync(EnumerateDataFeedParameters<SettingsDataFeed>, Mod, string, Mod, bool, bool)

public static IAsyncEnumerable<DataFeedItem> EnumerateMonkeysAsync(EnumerateDataFeedParameters<SettingsDataFeed> parameters, Mod mod, string monkeyType, Mod localeMod, bool forceCheck = false, bool canBeDisabled = true)

Parameters

parameters EnumerateDataFeedParameters<SettingsDataFeed>
mod Mod
monkeyType string
localeMod Mod
forceCheck bool
canBeDisabled bool

Returns

IAsyncEnumerable<DataFeedItem>

GetViewData(SettingsDataFeed)

Gets the SettingsViewData associated with this FrooxEngine.SettingsDataFeed.

public static SettingsViewData GetViewData(this SettingsDataFeed dataFeed)

Parameters

dataFeed SettingsDataFeed

The FrooxEngine.SettingsDataFeed to get the view data for.

Returns

SettingsViewData

The view data associated with this data feed.

InitBase(DataFeedItem, IReadOnlyList<string>, IReadOnlyList<string>, IDefiningConfigKey)

Shorthand for DataFeedItem.InitBase() with the FullId as well as the locale-name and locale-description of the given IDefiningConfigKey.

public static void InitBase(this DataFeedItem item, IReadOnlyList<string> path, IReadOnlyList<string> groupKeys, IDefiningConfigKey configKey)

Parameters

item DataFeedItem

The FrooxEngine.DataFeedItem to initialize.

path IReadOnlyList<string>

The path to initialize the item with.

groupKeys IReadOnlyList<string>

The group keys to initialize the item with.

configKey IDefiningConfigKey

The config key to initialize the id, and localize the name and description of the item with.

IsInjectableEditorType(Type)

Checks whether an editor template can be injected for the given Type.

public static bool IsInjectableEditorType(this Type type)

Parameters

type Type

The Type to check.

Returns

bool

true if the type is suitable for a template; otherwise, false.

IsInjectableEditorType<T>()

Checks whether an editor template can be injected for the given Type.

public static bool IsInjectableEditorType<T>()

Returns

bool

true if T is suitable for a template; otherwise, false.

Type Parameters

T

The type to check.

MoveUpFromCategory(EnumerateDataFeedParameters<SettingsDataFeed>)

Move up one element from the current path of the DataFeed.

public static void MoveUpFromCategory(this EnumerateDataFeedParameters<SettingsDataFeed> parameters)

Parameters

parameters EnumerateDataFeedParameters<SettingsDataFeed>

The parameters referencing the FrooxEngine.SettingsDataFeed to move up a category on.

SetupConfigKeyField<T>(IField<T>, IDefiningConfigKey)

Handles the standard case of setting up the field of a FrooxEngine.DataFeedItem to be synchronized with a config key.

public static void SetupConfigKeyField<T>(this IField<T> field, IDefiningConfigKey configKey)

Parameters

field IField<T>

The field to synchronize with the configKey.

configKey IDefiningConfigKey

The config key to synchronize with the field.

Type Parameters

T

The type of the field and config item's value.

Remarks

Adds a FrooxEngine.Comment with the configKey.FullId to allow easily mapping it back to the config key in the standalone facet process.

SetupConfigKeyField<T>(IField<T>, IDefiningConfigKey<T>)

Handles the standard case of setting up the field of a FrooxEngine.DataFeedItem to be synchronized with a config key.

public static void SetupConfigKeyField<T>(this IField<T> field, IDefiningConfigKey<T> configKey)

Parameters

field IField<T>

The field to synchronize with the configKey.

configKey IDefiningConfigKey<T>

The config key to synchronize with the field.

Type Parameters

T

The type of the field and config item's value.

Remarks

Adds a FrooxEngine.Comment with the configKey.FullId to allow easily mapping it back to the config key in the standalone facet process.