Table of Contents

Class ConfiguredResoniteEventSourceMonkey<TMonkey, TConfigSection, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5, TEvent6>

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

Represents the base class for patchers that run after ConfiguredResonite's assemblies have been loaded and that hook into the game's lifecycle, while using a TConfigSection ConfigSection.
Specifically, to act as an event source for the TEvent generic parameter(s).

public abstract class ConfiguredResoniteEventSourceMonkey<TMonkey, TConfigSection, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5, TEvent6> : ResoniteEventSourceMonkey<TMonkey, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5>, IResoniteMonkey, IEventSource<TEvent1>, IEventSource<TEvent2>, IEventSource<TEvent3>, IEventSource<TEvent4>, IEventSource<TEvent5>, IConfiguredMonkey<TConfigSection>, IConfiguredMonkey, IMonkey, IRun, IShutdown, IComparable<IMonkey>, INestedIdentifiable<Mod>, INestedIdentifiable, IIdentifiable, IAuthorable where TMonkey : ConfiguredResoniteEventSourceMonkey<TMonkey, TConfigSection, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5, TEvent6>, new() where TConfigSection : ConfigSection, new() where TEvent1 : SyncEvent where TEvent2 : SyncEvent where TEvent3 : SyncEvent where TEvent4 : SyncEvent where TEvent5 : SyncEvent where TEvent6 : SyncEvent

Type Parameters

TMonkey

The type of the actual patcher.

TConfigSection

The type of the config section to load.

TEvent1

The first SyncEvent type to dispatch.

TEvent2

The second SyncEvent type to dispatch.

TEvent3

The third SyncEvent type to dispatch.

TEvent4

The fourth SyncEvent type to dispatch.

TEvent5

The fifth SyncEvent type to dispatch.

TEvent6

The sixth SyncEvent type to dispatch.

Inheritance
MonkeyBase<TMonkey>
Monkey<TMonkey>
ResoniteEventSourceMonkey<TMonkey, TEvent1>
ResoniteEventSourceMonkey<TMonkey, TEvent1, TEvent2>
ResoniteEventSourceMonkey<TMonkey, TEvent1, TEvent2, TEvent3>
ResoniteEventSourceMonkey<TMonkey, TEvent1, TEvent2, TEvent3, TEvent4>
ResoniteEventSourceMonkey<TMonkey, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5>
ConfiguredResoniteEventSourceMonkey<TMonkey, TConfigSection, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5, TEvent6>
Implements
IEventSource<TEvent1>
IEventSource<TEvent2>
IEventSource<TEvent3>
IEventSource<TEvent4>
IEventSource<TEvent5>
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

ConfiguredResoniteEventSourceMonkey()

Allows creating only a single TMonkey instance.

protected ConfiguredResoniteEventSourceMonkey()

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 [HarmonyLib.HarmonyPatchCategory(nameof(MyPatcher))] attributes.

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