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.

MenuSwitchedToPatch.cs 794B

1234567891011121314151617181920212223242526272829
  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. [Obsolete]
  16. [HarmonyPatch(typeof(FullGameCompositionRoot), "SwitchToMenu")]
  17. class MenuSwitchedToPatch
  18. {
  19. public static void Postfix()
  20. {
  21. // Event emitters and handlers should already be registered by MenuActivated event
  22. Logging.Log("Dispatching Menu Switched To event");
  23. EventManager.GetEventEmitter("GamecraftModdingAPIMenuSwitchedToEventEmitter").Emit();
  24. }
  25. }
  26. }