Table of Contents

Class MonkeyTogglesConfigSection

Namespace
MonkeyLoader.Meta
Assembly
MonkeyLoader.dll

Specifies the toggles for the Monkeys of a Mod which support disabling.

public sealed class MonkeyTogglesConfigSection : ExpandoConfigSection, INestedIdentifiable<Config>, INestedIdentifiable, IIdentifiableOwner<ConfigSection, IDefiningConfigKey>, IIdentifiableOwner<IDefiningConfigKey>, IIdentifiable, IPrioritizable
Inheritance
MonkeyTogglesConfigSection
Implements
Inherited Members
Extension Methods

Properties

Description

Gets a description of the config items found in this section.

public override string Description { get; }

Property Value

string

Id

Gets the mod-unique identifier of this section.

public override string Id { get; }

Property Value

string

InternalAccessOnly

Gets whether only the owning mod should have access to this config item.

public override bool InternalAccessOnly { get; }

Property Value

bool

Remarks

By default: false.

Mod

Gets the Mod that these toggles are for.

public Mod Mod { get; }

Property Value

Mod

Version

Gets the semantic version for this config section.
This is used to check if the defined and saved configs are compatible.

public override Version Version { get; }

Property Value

Version

Methods

GetTemplateKey(IMonkey)

Creates a template key for the toggle of the given (early) monkey.

public static ITypedConfigKey<bool> GetTemplateKey(IMonkey monkey)

Parameters

monkey IMonkey

The (early) monkey to create a template key for.

Returns

ITypedConfigKey<bool>

The template key for the toggle of the (early) monkey.

GetToggle(IMonkey)

Gets or creates the toggle config item for the given (early) monkey.

public IDefiningConfigKey<bool> GetToggle(IMonkey monkey)

Parameters

monkey IMonkey

The (early) monkey to get the key for. Must belong to the same Mod and support being disabled.

Returns

IDefiningConfigKey<bool>

The toggle config item for the given (early) monkey.

Exceptions

ArgumentNullException

When the monkey is null.

ArgumentException

When the monkey is from another Mod or doesn't support being disabled.