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
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
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
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
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
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
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
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
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
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
parametersEnumerateDataFeedParameters<SettingsDataFeed>modModmonkeyTypestringlocaleModModforceCheckboolcanBeDisabledbool
Returns
- IAsyncEnumerable<DataFeedItem>
GetViewData(SettingsDataFeed)
Gets the SettingsViewData associated with this FrooxEngine.SettingsDataFeed.
public static SettingsViewData GetViewData(this SettingsDataFeed dataFeed)
Parameters
dataFeedSettingsDataFeedThe 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
itemDataFeedItemThe FrooxEngine.DataFeedItem to initialize.
pathIReadOnlyList<string>The path to initialize the item with.
groupKeysIReadOnlyList<string>The group keys to initialize the item with.
configKeyIDefiningConfigKeyThe 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
Returns
- bool
trueif thetypeis 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
trueifTis suitable for a template; otherwise,false.
Type Parameters
TThe 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
parametersEnumerateDataFeedParameters<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
fieldIField<T>The field to synchronize with the
configKey.configKeyIDefiningConfigKeyThe config key to synchronize with the
field.
Type Parameters
TThe 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
fieldIField<T>The field to synchronize with the
configKey.configKeyIDefiningConfigKey<T>The config key to synchronize with the
field.
Type Parameters
TThe 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.