Class ConfiguredResoniteAsyncEventSourceMonkey<TMonkey, TConfigSection, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5>
- 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.
Specifically, to act as an async event source for the TEvent
generic parameter(s).
public abstract class ConfiguredResoniteAsyncEventSourceMonkey<TMonkey, TConfigSection, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5> : ResoniteAsyncEventSourceMonkey<TMonkey, TEvent1, TEvent2, TEvent3, TEvent4>, IResoniteMonkey, IAsyncEventSource<TEvent1>, IAsyncEventSource<TEvent2>, IAsyncEventSource<TEvent3>, IAsyncEventSource<TEvent4>, IConfiguredMonkey<TConfigSection>, IConfiguredMonkey, IMonkey, IRun, IShutdown, IComparable<IMonkey>, INestedIdentifiable<Mod>, INestedIdentifiable, IIdentifiable, IAuthorable where TMonkey : ConfiguredResoniteAsyncEventSourceMonkey<TMonkey, TConfigSection, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5>, new() where TConfigSection : ConfigSection, new() where TEvent1 : AsyncEvent where TEvent2 : AsyncEvent where TEvent3 : AsyncEvent where TEvent4 : AsyncEvent where TEvent5 : AsyncEvent
Type Parameters
TMonkey
The type of the actual patcher.
TConfigSection
TEvent1
The first AsyncEvent type to dispatch.
TEvent2
The second AsyncEvent type to dispatch.
TEvent3
The third AsyncEvent type to dispatch.
TEvent4
The fourth AsyncEvent type to dispatch.
TEvent5
The fifth AsyncEvent type to dispatch.
- Inheritance
-
MonkeyBase<TMonkey>Monkey<TMonkey>ResoniteMonkey<TMonkey>ResoniteAsyncEventSourceMonkey<TMonkey, TEvent1>ResoniteAsyncEventSourceMonkey<TMonkey, TEvent1, TEvent2>ResoniteAsyncEventSourceMonkey<TMonkey, TEvent1, TEvent2, TEvent3>ResoniteAsyncEventSourceMonkey<TMonkey, TEvent1, TEvent2, TEvent3, TEvent4>ConfiguredResoniteAsyncEventSourceMonkey<TMonkey, TConfigSection, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5>
- Implements
-
IAsyncEventSource<TEvent1>IAsyncEventSource<TEvent2>IAsyncEventSource<TEvent3>IAsyncEventSource<TEvent4>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
ConfiguredResoniteAsyncEventSourceMonkey()
Allows creating only a single TMonkey
instance.
protected ConfiguredResoniteAsyncEventSourceMonkey()
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().
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
.