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.

35 lines
1.1KB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Reflection;
  7. using Harmony;
  8. using Svelto.Context;
  9. using Svelto.ECS;
  10. using RobocraftX;
  11. using RobocraftX.Multiplayer;
  12. using Unity.Entities;
  13. using GamecraftModdingAPI.Utility;
  14. namespace GamecraftModdingAPI.Commands
  15. {
  16. [HarmonyPatch]
  17. public static class CommandPatch
  18. {
  19. public static void Prefix(UnityContext<FullGameCompositionRoot> contextHolder, EnginesRoot enginesRoot, World physicsWorld, Action reloadGame, MultiplayerInitParameters multiplayerParameters)
  20. {
  21. Logging.Log("Command Line was loaded");
  22. // When a game is loaded, register the command engines
  23. // TODO
  24. }
  25. public static MethodBase TargetMethod(HarmonyInstance instance)
  26. {
  27. var func = (Action<UnityContext<FullGameCompositionRoot>, EnginesRoot, World, Action, MultiplayerInitParameters>)RobocraftX.GUI.CommandLine.CommandLineCompositionRoot.Compose<UnityContext<FullGameCompositionRoot>>;
  28. return func.Method;
  29. }
  30. }
  31. }