27 lines
565 B
C#
27 lines
565 B
C#
|
using System;
|
|||
|
using System.Reflection;
|
|||
|
|
|||
|
using RobocraftX.CR.MainGame;
|
|||
|
using RobocraftX.StateSync;
|
|||
|
|
|||
|
using HarmonyLib;
|
|||
|
|
|||
|
namespace GamecraftModdingAPI.App
|
|||
|
{
|
|||
|
[HarmonyPatch]
|
|||
|
class StateSyncRegPatch
|
|||
|
{
|
|||
|
public static void Postfix(StateSyncRegistrationHelper stateSyncReg)
|
|||
|
{
|
|||
|
// register sim/build events engines
|
|||
|
Game.InitDeterministic(stateSyncReg);
|
|||
|
}
|
|||
|
|
|||
|
[HarmonyTargetMethod]
|
|||
|
public static MethodBase Target()
|
|||
|
{
|
|||
|
return AccessTools.Method(typeof(MainGameCompositionRoot), "DeterministicCompose").MakeGenericMethod(typeof(object));
|
|||
|
}
|
|||
|
}
|
|||
|
}
|