Table of Contents

Class DataFeedBuilderMonkey<TMonkey, TDataFeed>

Namespace
MonkeyLoader.Resonite.DataFeeds
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 add one or more async parametrized building blocks to an async parametrized enumerable builder for a TDataFeed's Enumerate method.

public abstract class DataFeedBuilderMonkey<TMonkey, TDataFeed> : ResoniteMonkey<TMonkey>, IResoniteMonkey, IMonkey, IRun, IShutdown, IComparable<IMonkey>, INestedIdentifiable<Mod>, INestedIdentifiable, IIdentifiable, IAuthorable where TMonkey : DataFeedBuilderMonkey<TMonkey, TDataFeed>, new() where TDataFeed : IDataFeed

Type Parameters

TMonkey

The type of the actual patcher.

TDataFeed

The FrooxEngine.IDataFeed to modify.

Inheritance
MonkeyBase<TMonkey>
Monkey<TMonkey>
DataFeedBuilderMonkey<TMonkey, TDataFeed>
Implements
Derived
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.

Methods

AddBuildingBlocks(IAsyncParametrizedEnumerableBuilder<DataFeedItem, EnumerateDataFeedParameters<TDataFeed>>)

Called to add one or more async parametrized building blocks to the async parametrized enumerable builder for this TDataFeed.

protected abstract void AddBuildingBlocks(IAsyncParametrizedEnumerableBuilder<DataFeedItem, EnumerateDataFeedParameters<TDataFeed>> builder)

Parameters

builder IAsyncParametrizedEnumerableBuilder<DataFeedItem, EnumerateDataFeedParameters<TDataFeed>>

The enumerable builder to add one or more building blocks too.

Remarks

The default items of the FrooxEngine.IDataFeed.Enumerate() method are inserted at priority 0, unless disabled through the parameters.

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: Calls AddBuildingBlock and returns true.

OnShutdown(bool)

Lets this monkey cleanup and shutdown.

protected override bool OnShutdown(bool applicationExiting)

Parameters

applicationExiting bool

Whether the shutdown was caused by the application exiting.

Returns

bool

true if it ran successfully; otherwise, false.

Remarks

By default: Removes all building blocks added by this Monkey and all HarmonyLib.Harmony patches done using this Monkey's Harmony instance, if not exiting, and returns true.