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.

26 lines
601B

  1. using System;
  2. using RobocraftX.StateSync;
  3. using Svelto.ECS;
  4. using HarmonyLib;
  5. namespace GamecraftModdingAPI.Utility
  6. {
  7. [HarmonyPatch(typeof(DeterministicStepCompositionRoot), "ResetWorld")]
  8. public static class DeterministicStepCompositionRootPatch
  9. {
  10. private static SimpleEntitiesSubmissionScheduler engineRootScheduler;
  11. public static void Postfix(SimpleEntitiesSubmissionScheduler scheduler)
  12. {
  13. engineRootScheduler = scheduler;
  14. }
  15. internal static void SubmitEntitiesNow()
  16. {
  17. if (engineRootScheduler != null)
  18. engineRootScheduler.SubmitEntities();
  19. }
  20. }
  21. }