Table of Contents

Class ConfiguredResoniteCancelableAsyncEventHandlerMonkey<TMonkey, TConfigSection, TEvent>

Namespace
MonkeyLoader.Resonite
Assembly
MonkeyLoader.Resonite.Integration.dll

Represents the base class for patchers that run after Resonite's assemblies have been loaded and that hook into the game's lifecycle, while using a TConfigSectionConfigSection.
Specifically, to act as an async event handler for cancelable TEvents.

public abstract class ConfiguredResoniteCancelableAsyncEventHandlerMonkey<TMonkey, TConfigSection, TEvent> : ResoniteCancelableAsyncEventHandlerMonkey<TMonkey, TEvent>, IResoniteMonkey, ICancelableAsyncEventHandler<TEvent>, IPrioritizable, IConfiguredMonkey<TConfigSection>, IConfiguredMonkey, IMonkey, IRun, IShutdown, IComparable<IMonkey>, INestedIdentifiable<Mod>, INestedIdentifiable, IIdentifiable where TMonkey : ConfiguredResoniteCancelableAsyncEventHandlerMonkey<TMonkey, TConfigSection, TEvent>, new() where TConfigSection : ConfigSection, new() where TEvent : CancelableAsyncEvent

Type Parameters

TMonkey

The type of the actual patcher.

TConfigSection
TEvent
Inheritance
MonkeyBase<TMonkey>
Monkey<TMonkey>
ConfiguredResoniteCancelableAsyncEventHandlerMonkey<TMonkey, TConfigSection, TEvent>
Implements
IConfiguredMonkey<TConfigSection>
Inherited Members
Extension Methods

Remarks

Game assemblies and their types can be directly referenced from these.
Contains useful overridable methods that are hooked to different points in the game's lifecycle.

Constructors

ConfiguredResoniteCancelableAsyncEventHandlerMonkey()

protected ConfiguredResoniteCancelableAsyncEventHandlerMonkey()

Properties

ConfigSection

Gets the loaded config section for this patcher after it has been run.

public static TConfigSection ConfigSection { get; }

Property Value

TConfigSection

Methods

OnLoaded()

Called right after the game tooling packs and all the game's assemblies have been loaded.
Use this to apply any patching and return true if it was successful.

protected override bool OnLoaded()

Returns

bool

true if it ran successfully; otherwise, false.

Remarks

Override this method if you need to patch something involved in the initialization of the game.
For ResoniteMonkeys, the default behavior ofOnLoaded() is moved to OnEngineReady().

Strongly consider also overriding OnEngineReady() if you override this method.
Otherwise your patches will be applied twice, if you're using [HarmonyPatchCategory(nameof(MyPatcher))] attributes.

By default: Loads this patcher's TConfigSectionConfigSection and returns true.