From 00a09ac8a7787a0375c6c315c9f121be54ad882d Mon Sep 17 00:00:00 2001 From: status102 Date: Wed, 18 Oct 2023 20:27:05 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E8=87=AA=E5=8A=A8=E6=88=98=E6=96=97-?= =?UTF-8?q?=E6=88=98=E6=96=97=E5=88=97=E8=A1=A8-=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=97=B6=E4=BD=BF=E7=94=A8=E6=AD=A3=E5=88=99?= =?UTF-8?q?=E6=8F=90=E5=8F=96=E6=96=87=E4=BB=B6=E5=90=8D=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=85=B3=E5=8D=A1=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs index bcd69092d8..3e0c8802dd 100644 --- a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs @@ -466,11 +466,17 @@ namespace MaaWpfGui.ViewModels.UI var json = (JObject)JsonConvert.DeserializeObject(jsonStr); if (json is null || !json.ContainsKey("stage_name") || !json.ContainsKey("actions")) { - AddLog($"{filename} corrupted", UiLogColor.Error); + AddLog($"{filename} is broken", UiLogColor.Error); return; } - taskPairs.Add(fileInfo.Name.Substring(0, fileInfo.Name.Length - fileInfo.Extension.Length).Replace("突袭", "-Adverse"), filename); + var stageName = FindStageName(fileInfo.Name.Substring(0, fileInfo.Name.Length - fileInfo.Extension.Length)); + if (fileInfo.Name.Contains("突袭") || fileInfo.Name.Contains("-Adverse")) + { + stageName += "-Adverse"; + } + + taskPairs.Add(stageName, filename); } catch (Exception) {