TechbloxModdingAPI/GamecraftModdingAPI/Commands/CommandPatch.cs
Norbi Peti 62318b0843 Update to Gamecraft 2020.06.11.18.50
Removed some inputs from FakeInput
2020-06-12 17:27:36 +02:00

39 lines
1.2 KiB
C#

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
using HarmonyLib;
using Svelto.Context;
using Svelto.ECS;
using RobocraftX;
using GamecraftModdingAPI.Utility;
namespace GamecraftModdingAPI.Commands
{
/// <summary>
/// Patch of RobocraftX.GUI.CommandLine.CommandLineCompositionRoot.Compose<T>()
/// </summary>
// TODO: fix
[HarmonyPatch]
//[HarmonyPatch(typeof(RobocraftX.GUI.CommandLine.CommandLineCompositionRoot))]
//[HarmonyPatch("Compose")]
//[HarmonyPatch("Compose", new Type[] { typeof(UnityContext<FullGameCompositionRoot>), typeof(EnginesRoot), typeof(World), typeof(Action), typeof(MultiplayerInitParameters), typeof(StateSyncRegistrationHelper)})]
static class CommandPatch
{
public static void Postfix(EnginesRoot enginesRoot)
{
// When a game is loaded, register the command engines
CommandManager.RegisterEngines(enginesRoot);
}
public static MethodBase TargetMethod(Harmony instance)
{
return typeof(RobocraftX.GUI.CommandLine.CommandLineCompositionRoot).GetMethod("Compose").MakeGenericMethod(typeof(object));
//return func.Method;
}
}
}