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.

29 lines
779B

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