A stable modding interface between Techblox and mods https://mod.exmods.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

StateSyncRegPatch.cs 565B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Reflection;
  3. using RobocraftX.CR.MainGame;
  4. using RobocraftX.StateSync;
  5. using HarmonyLib;
  6. namespace GamecraftModdingAPI.App
  7. {
  8. [HarmonyPatch]
  9. class StateSyncRegPatch
  10. {
  11. public static void Postfix(StateSyncRegistrationHelper stateSyncReg)
  12. {
  13. // register sim/build events engines
  14. Game.InitDeterministic(stateSyncReg);
  15. }
  16. [HarmonyTargetMethod]
  17. public static MethodBase Target()
  18. {
  19. return AccessTools.Method(typeof(MainGameCompositionRoot), "DeterministicCompose").MakeGenericMethod(typeof(object));
  20. }
  21. }
  22. }