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.

49 lines
1.3KB

  1. using System;
  2. using IllusionPlugin;
  3. using UnityEngine;
  4. using Harmony;
  5. using System.Reflection;
  6. namespace GamecraftModdingAPI
  7. {
  8. // unused by design
  9. public class GamecraftModdingAPIPlugin //: IllusionPlugin.IEnhancedPlugin
  10. {
  11. public static HarmonyInstance harmony { get; protected set; }
  12. public string[] Filter { get; } = new string[] { "Gamecraft" };
  13. public string Name { get; } = "Gamecraft Modding API";
  14. public string Version { get; } = "v0.1.0.A";
  15. public string HarmonyID { get; } = "org.git.exmods.modtainers.gamecraftmoddingapi";
  16. public void OnApplicationQuit()
  17. {
  18. harmony.UnpatchAll(HarmonyID);
  19. Debug.Log(Name + " shutdown complete");
  20. }
  21. public void OnApplicationStart()
  22. {
  23. if (harmony == null)
  24. {
  25. harmony = HarmonyInstance.Create(HarmonyID);
  26. harmony.PatchAll(Assembly.GetExecutingAssembly());
  27. }
  28. Debug.Log(Name + " start & patch complete");
  29. }
  30. public void OnFixedUpdate() { }
  31. public void OnLateUpdate() { }
  32. public void OnLevelWasInitialized(int level) { }
  33. public void OnLevelWasLoaded(int level) { }
  34. public void OnUpdate() { }
  35. }
  36. }