Fix debug console commands

This commit is contained in:
Evil Factory
2026-03-01 13:26:36 -03:00
parent 9ee4728e2a
commit f8ff97d2b7
3 changed files with 53 additions and 55 deletions
@@ -660,12 +660,6 @@ namespace Barotrauma
return;
}
bool luaCsEnabled = true;
if (args.Length > 3)
{
bool.TryParse(args[3], out luaCsEnabled);
}
GameMain.MainMenuScreen.QuickStart(fixedSeed: false, subName, difficulty, levelGenerationParams);
}, getValidArgs: () => new[] { SubmarineInfo.SavedSubmarines.Select(s => s.Name).Distinct().OrderBy(s => s).ToArray() }));
@@ -4222,24 +4216,6 @@ namespace Barotrauma
NewMessage("Minimum main path width: " + (Level.Loaded.LevelData?.MinMainPathWidth?.ToString() ?? "unknown"));
}
});
commands.Add(new Command("cl_lua", $"cl_lua: Runs a string on the client.", (string[] args) =>
{
if (GameMain.Client != null && !GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
{
ThrowError("Command not permitted.");
return;
}
if (LuaCsSetup.Instance.CurrentRunState != RunState.Running)
{
ThrowError("LuaCs not initialized, use the console command cl_reloadluacs to force initialization.");
return;
}
var result = LuaCsSetup.Instance.LuaScriptManagementService.DoString(string.Join(" ", args));
LuaCsSetup.Instance.Logger.LogResults(result.ToResult());
}));
}
private static void ReloadWearables(Character character, int variant = 0)