diff --git a/BuildingTools/BuildingTools.cs b/BuildingTools/BuildingTools.cs index 5ac1a0b..dda2e65 100644 --- a/BuildingTools/BuildingTools.cs +++ b/BuildingTools/BuildingTools.cs @@ -210,6 +210,15 @@ namespace BuildingTools return copy; }).ToArray(); }).Build(); + CommandBuilder.Builder("setLimits", "Sets the CPU and power limits.") + .Action((int cpu, int power) => + { + var data = FullGameFields._dataDb.GetValue(1); + Logging.CommandLog($"Old CPU limit: {data.CPULimitMax}, power limit: {data.PowerLimitMax}"); + data.PowerLimitMax = power; + data.CPULimitMax = cpu; + Logging.CommandLog($"New CPU limit: {data.CPULimitMax}, power limit: {data.PowerLimitMax}"); + }).Build(); var noClip = new NoClipCommand(); GameEngineManager.AddGameEngine(noClip); diff --git a/BuildingTools/CommandUtils.cs b/BuildingTools/CommandUtils.cs index b35b711..51bb175 100644 --- a/BuildingTools/CommandUtils.cs +++ b/BuildingTools/CommandUtils.cs @@ -3,7 +3,6 @@ using Gamecraft.Wires; using TechbloxModdingAPI; using TechbloxModdingAPI.Commands; using TechbloxModdingAPI.Utility; -using RobocraftX.CommandLine.Custom; namespace BuildingTools { @@ -22,12 +21,6 @@ namespace BuildingTools { action(a1, _blockSelections.blocks, _blockSelections.refBlock); }).Build(); - ConsoleCommands.RegisterWithChannel(name + "Chan", (a1, ch) => - { - Console.WriteLine($"Command {name} with args {a1} and channel {ch} executing"); - /*var blks = _blockSelections.SelectBlocks(ch); - TODO: Re-add support if object IDs exist again - action(a1, blks, blks[0]);*/ - }, ChannelType.Object, desc); } public void RegisterBlockCommand(string name, string desc, Action action) diff --git a/BuildingTools/NoClipCommand.cs b/BuildingTools/NoClipCommand.cs index 82236af..ccc129b 100644 --- a/BuildingTools/NoClipCommand.cs +++ b/BuildingTools/NoClipCommand.cs @@ -57,7 +57,7 @@ namespace BuildingTools { EnsureFlying(); ChangeCollider(_collisionFilter); - if (!entitiesDB.Exists(0U, CommonExclusiveGroups.GameStateGroup)) + if (!entitiesDB.Exists(0U, CommonExclusiveGroups.GameStateGroup)) { yield break; }