From 4952a4b53954b911ae1c77a58866d32f8ef237e6 Mon Sep 17 00:00:00 2001 From: num0005 Date: Sun, 30 Jun 2024 21:59:31 +0100 Subject: [PATCH] Enable batch when running without a window. --- Launcher/ToolkitInterface/H2Toolkit.cs | 2 +- Launcher/ToolkitInterface/ToolkitBase.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Launcher/ToolkitInterface/H2Toolkit.cs b/Launcher/ToolkitInterface/H2Toolkit.cs index 22c235b..b0faa18 100644 --- a/Launcher/ToolkitInterface/H2Toolkit.cs +++ b/Launcher/ToolkitInterface/H2Toolkit.cs @@ -154,7 +154,7 @@ private async Task RunMergeLightmap(string scenario, string bsp, int workerCount private async Task RunLightmapWorker(string scenario, string bsp, string quality, int workerCount, int index, bool useFast, CancellationToken cancelationToken, OutputMode output) { - this.LogFileSuffix = $"_{index}"; + this.LogFileSuffix = $"-{index}"; if (Profile.IsMCC) { bool wereWeExperts = Profile.ElevatedToExpert; diff --git a/Launcher/ToolkitInterface/ToolkitBase.cs b/Launcher/ToolkitInterface/ToolkitBase.cs index 34c83fa..aa1a6d6 100644 --- a/Launcher/ToolkitInterface/ToolkitBase.cs +++ b/Launcher/ToolkitInterface/ToolkitBase.cs @@ -340,14 +340,14 @@ protected virtual string ToLocalPath(string path) /// public async Task RunCustomToolCommand(string command) { - await Utility.Process.StartProcessWithShell(BaseDirectory, GetToolExecutable(ToolType.Tool), Utility.Process.EscapeArgList(GetArgsToPrepend(noWindow: false)) + " " + command); + await Utility.Process.StartProcessWithShell(BaseDirectory, GetToolExecutable(ToolType.Tool), Utility.Process.EscapeArgList(GetArgsToPrepend()) + " " + command); } /// /// Get the args to prepend to every invokaing of a game tool /// /// List with all the args to add - private List GetArgsToPrepend(bool noWindow) + private List GetArgsToPrepend(bool hasWindow = true) { List args = new(); @@ -383,7 +383,7 @@ private List GetArgsToPrepend(bool noWindow) args.Add("-expert_mode"); } - if (Profile.Batch || noWindow) + if (Profile.Batch || !hasWindow) { args.Add("-batch"); }