|
|
@@ -21,22 +21,21 @@ namespace GamecraftModdingAPI.Commands |
|
|
|
/// Patch of RobocraftX.GUI.CommandLine.CommandLineCompositionRoot.Compose<T>() |
|
|
|
/// </summary> |
|
|
|
// TODO: fix |
|
|
|
//[HarmonyPatch] |
|
|
|
[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(object contextHolder, EnginesRoot enginesRoot, World physicsWorld, Action reloadGame, MultiplayerInitParameters multiplayerParameters, StateSyncRegistrationHelper stateSyncReg) |
|
|
|
public static void Postfix(object contextHolder, EnginesRoot enginesRoot, World physicsWorld, Action reloadGame, MultiplayerInitParameters multiplayerParameters, ref StateSyncRegistrationHelper stateSyncReg) |
|
|
|
{ |
|
|
|
Logging.MetaDebugLog("Command Line was loaded"); |
|
|
|
// When a game is loaded, register the command engines |
|
|
|
CommandManager.RegisterEngines(enginesRoot); |
|
|
|
} |
|
|
|
|
|
|
|
public static MethodBase TargetMethod(HarmonyInstance instance) |
|
|
|
{ |
|
|
|
return typeof(RobocraftX.GUI.CommandLine.CommandLineCompositionRoot).GetMethod("Compose").MakeGenericMethod(typeof(object)); |
|
|
|
|
|
|
|
return typeof(RobocraftX.GUI.CommandLine.CommandLineCompositionRoot).GetMethod("Compose").MakeGenericMethod(typeof(object)); |
|
|
|
//return func.Method; |
|
|
|
} |
|
|
|
} |
|
|
|