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.

GameReloadedPatch.cs 746B

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Harmony;
  7. using RobocraftX;
  8. using GamecraftModdingAPI.Utility;
  9. namespace GamecraftModdingAPI.Events
  10. {
  11. /// <summary>
  12. /// Patch of RobocraftX.FullGameCompositionRoot.ReloadGame()
  13. /// </summary>
  14. [HarmonyPatch(typeof(FullGameCompositionRoot), "ReloadGame")]
  15. class GameReloadedPatch
  16. {
  17. public static void Postfix()
  18. {
  19. // Event emitters and handlers should already be registered by GameActivatedPatch
  20. Logging.Log("Dispatching Game Reloaded event");
  21. EventManager.GetEventEmitter("GamecraftModdingAPIGameReloadedEventEmitter").Emit();
  22. }
  23. }
  24. }