diff --git a/extracommands/ToggleJumpCommandEngine.cs b/extracommands/ToggleJumpCommandEngine.cs index 0b2f522..6cc4c6d 100644 --- a/extracommands/ToggleJumpCommandEngine.cs +++ b/extracommands/ToggleJumpCommandEngine.cs @@ -16,8 +16,8 @@ using RobocraftX; namespace ExtraCommands.Basics { - [HarmonyPatch] - [CustomCommand] + //[HarmonyPatch] + //[CustomCommand("ToggleJumpEnabled")] class ToggleJumpCommandEngine : CustomCommandEngine { private static bool isJumpEnabled = false; diff --git a/extracommands/UnregisterCommandEngine.cs b/extracommands/UnregisterCommandEngine.cs deleted file mode 100644 index 6546aec..0000000 --- a/extracommands/UnregisterCommandEngine.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Reflection; -using Harmony; -using UnityEngine; -using Unity.Entities; -using RobocraftX; -using RobocraftX.GUI.CommandLine; -using RobocraftX.Multiplayer; -using Svelto.ECS; -using Svelto.Context; - -namespace ExtraCommands -{ - class UnregisterCommandEngine : CustomCommandEngine - { - public UnregisterCommandEngine(UnityContext ctxHolder, EnginesRoot enginesRoot, World physW, Action reloadGame, MultiplayerInitParameters mpParams) : base(ctxHolder, enginesRoot, physW, reloadGame, mpParams) - { - } - public override void Dispose() - { - int count = 0; - MethodInfo commandRemoveHelp = Harmony.AccessTools.Method(Harmony.AccessTools.TypeByName("RobocraftX.GUI.CommandLine.CommandLineUtility"), "UnregisterCommandHelp", new Type[] { typeof(string) }); - foreach (Type t in typeof(CustomCommandEngine).Assembly.GetTypes()) - { - CustomCommandAttribute[] attributes = (CustomCommandAttribute[])t.GetCustomAttributes(typeof(CustomCommandAttribute), false); - foreach (CustomCommandAttribute attr in attributes) - { - if (attr != null && t.IsSubclassOf(typeof(CustomCommandEngine))) - { - // remove Gamecraft help command - commandRemoveHelp.Invoke(null, new string[] { attr.Name }); - count++; - } - } - } - Debug.Log($"Removed {count} custom commands"); - } - } -} diff --git a/extracommands/WaitCommandEngine.cs b/extracommands/WaitCommandEngine.cs index 2dd1899..c5fd0f1 100644 --- a/extracommands/WaitCommandEngine.cs +++ b/extracommands/WaitCommandEngine.cs @@ -21,7 +21,7 @@ namespace ExtraCommands.Basics public override void Ready() { - CustomCommandUtility.Register("Wait", WaitCommand, "Delay execution for a length of time (ms)"); + CustomCommandUtility.Register("Wait", WaitCommand, "Delay execution (freeze the game) for a length of time (ms)"); } private void WaitCommand(int ms)