From 2e9ff47dbb0fd3282139e1aacc905892e2bfcbd1 Mon Sep 17 00:00:00 2001 From: aoxuan Date: Fri, 11 Apr 2025 10:18:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(config):=20=E7=A7=BB=E9=99=A4=E4=BA=86?= =?UTF-8?q?=E5=89=BF=E7=81=AD=E6=A8=A1=E5=BC=8F=E7=9A=84=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91=E3=80=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=B4=AF=E5=8A=A0=E6=8E=89=E8=90=BD=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E6=95=88=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/config.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/core/config.py b/app/core/config.py index eb8958a..6a4feec 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -542,8 +542,6 @@ class AppConfig: if drop_match: # 发现新的掉落统计,重置当前关卡的掉落数据 current_stage = drop_match.group(1) - if current_stage == "WE": - current_stage = "剿灭模式" last_drop_stats = {} continue @@ -575,10 +573,8 @@ class AppConfig: # 累加掉落数据 for item, count in last_drop_stats.items(): - if item in all_stage_drops[current_stage]: - all_stage_drops[current_stage][item] += count - else: - all_stage_drops[current_stage][item] = count + all_stage_drops[current_stage].setdefault(item, 0) + all_stage_drops[current_stage][item] += count # 将累加后的掉落数据保存到结果中 data["drop_statistics"] = all_stage_drops @@ -944,3 +940,5 @@ class MaaConfig(QConfig): Config = AppConfig() + +