Class ConfiguredResoniteEventHandlerMonkey<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 Resonite's assemblies have been loaded and that hook into the game's lifecycle,
while using a .TConfigSection ConfigSection
Specifically, to act as an event handler for the TEvent generic parameter(s).
public abstract class ConfiguredResoniteEventHandlerMonkey<TMonkey, TConfigSection, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5, TEvent6> : ResoniteEventHandlerMonkey<TMonkey, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5, TEvent6>, IResoniteMonkey, IEventHandler<TEvent1>, IEventHandler<TEvent2>, IEventHandler<TEvent3>, IEventHandler<TEvent4>, IEventHandler<TEvent5>, IEventHandler<TEvent6>, IPrioritizable, IConfiguredMonkey<TConfigSection>, IConfiguredMonkey, IMonkey, IRun, IShutdown, IComparable<IMonkey>, INestedIdentifiable<Mod>, INestedIdentifiable, IIdentifiable, IAuthorable, IDisplayable where TMonkey : ConfiguredResoniteEventHandlerMonkey<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
TMonkeyThe type of the actual patcher.
TConfigSectionThe type of the config section to load.
TEvent1The first Event type to handle.
TEvent2The second Event type to handle.
TEvent3The third Event type to handle.
TEvent4The fourth Event type to handle.
TEvent5The fifth Event type to handle.
TEvent6The sixth Event type to handle.
- Inheritance
-
MonkeyBase<TMonkey>Monkey<TMonkey>ResoniteMonkey<TMonkey>ResoniteEventHandlerMonkey<TMonkey, TEvent1>ResoniteEventHandlerMonkey<TMonkey, TEvent1, TEvent2>ResoniteEventHandlerMonkey<TMonkey, TEvent1, TEvent2, TEvent3>ResoniteEventHandlerMonkey<TMonkey, TEvent1, TEvent2, TEvent3, TEvent4>ResoniteEventHandlerMonkey<TMonkey, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5>ResoniteEventHandlerMonkey<TMonkey, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5, TEvent6>ConfiguredResoniteEventHandlerMonkey<TMonkey, TConfigSection, TEvent1, TEvent2, TEvent3, TEvent4, TEvent5, TEvent6>
- Implements
-
IEventHandler<TEvent1>IEventHandler<TEvent2>IEventHandler<TEvent3>IEventHandler<TEvent4>IEventHandler<TEvent5>IEventHandler<TEvent6>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
ConfiguredResoniteEventHandlerMonkey()
Allows creating only a single TMonkey instance.
protected ConfiguredResoniteEventHandlerMonkey()
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
trueif 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
[HarmonyPatchCategory(nameof(MyPatcher))] attributes.
By default: Loads this patcher's TConfigSection
ConfigSection and returns true.