From 1c7988fbfed7677c6bfad0e143a4d42c82021aed Mon Sep 17 00:00:00 2001 From: Beatrice-betty Date: Mon, 18 May 2026 19:04:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=B7=E9=87=8C=E6=95=B0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=BB=8F=E9=AA=8C=E6=A3=80=E6=B5=8B=E5=90=8E?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/template.json | 3 --- module/config/argument/args.json | 10 ---------- module/config/argument/argument.yaml | 5 ----- module/config/argument/task.yaml | 1 - module/config/config_generated.py | 3 --- module/config/i18n/en-US.json | 12 ------------ module/config/i18n/ja-JP.json | 12 ------------ module/config/i18n/zh-CN.json | 12 ------------ module/config/i18n/zh-MIAO.json | 12 ------------ module/config/i18n/zh-TW.json | 12 ------------ module/os/tasks/hazard_leveling.py | 19 +++++++++---------- 11 files changed, 9 insertions(+), 92 deletions(-) diff --git a/config/template.json b/config/template.json index 1223b4271..eb33ad2c4 100644 --- a/config/template.json +++ b/config/template.json @@ -2652,9 +2652,6 @@ "CustomCheckPositions": null, "DelayAfterFull": false }, - "OpsiSeaMiles": { - "Enable": false - }, "OpsiFleetAutoChange": { "Enable": false, "CooldownHours": 24, diff --git a/module/config/argument/args.json b/module/config/argument/args.json index 4e4cf676d..cec7076a1 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -12971,16 +12971,6 @@ "value": false } }, - "OpsiSeaMiles": { - "Enable": { - "type": "checkbox", - "value": false, - "option": [ - true, - false - ] - } - }, "OpsiFleetAutoChange": { "Enable": { "type": "checkbox", diff --git a/module/config/argument/argument.yaml b/module/config/argument/argument.yaml index e792cd899..5cd309b1d 100644 --- a/module/config/argument/argument.yaml +++ b/module/config/argument/argument.yaml @@ -1195,11 +1195,6 @@ OpsiCheckLeveling: CustomCheckPositions: value: '' DelayAfterFull: false -OpsiSeaMiles: - Enable: - type: checkbox - value: false - option: [true, false] OpsiFleetAutoChange: Enable: type: checkbox diff --git a/module/config/argument/task.yaml b/module/config/argument/task.yaml index 7ddeb5b34..7c59d3638 100644 --- a/module/config/argument/task.yaml +++ b/module/config/argument/task.yaml @@ -367,7 +367,6 @@ Opsi: - OpsiSirenBug - OpsiFleet - OpsiCheckLeveling - - OpsiSeaMiles - OpsiFleetAutoChange OpsiScheduling: - Scheduler diff --git a/module/config/config_generated.py b/module/config/config_generated.py index b8710117e..4bc193513 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -756,9 +756,6 @@ class GeneratedConfig: OpsiCheckLeveling_CustomCheckPositions = None OpsiCheckLeveling_DelayAfterFull = False - # Group `OpsiSeaMiles` - OpsiSeaMiles_Enable = False # True, False - # Group `OpsiFleetAutoChange` OpsiFleetAutoChange_Enable = False # True, False OpsiFleetAutoChange_CooldownHours = 24 # 12, 24, 48, 72 diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index c67a9115c..9a74dd5f0 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -3661,18 +3661,6 @@ "help": "When full experience is detected, this task will be delayed for the specified duration." } }, - "OpsiSeaMiles": { - "_info": { - "name": "OpsiSeaMiles._info.name", - "help": "OpsiSeaMiles._info.help" - }, - "Enable": { - "name": "OpsiSeaMiles.Enable.name", - "help": "OpsiSeaMiles.Enable.help", - "True": "True", - "False": "False" - } - }, "OpsiFleetAutoChange": { "_info": { "name": "OpsiFleetAutoChange._info.name", diff --git a/module/config/i18n/ja-JP.json b/module/config/i18n/ja-JP.json index 3f606f1b9..ecf9bd3ac 100644 --- a/module/config/i18n/ja-JP.json +++ b/module/config/i18n/ja-JP.json @@ -3661,18 +3661,6 @@ "help": "完全な経験が検出されると、このタスクは指定された時間延期されます。" } }, - "OpsiSeaMiles": { - "_info": { - "name": "OpsiSeaMiles._info.name", - "help": "OpsiSeaMiles._info.help" - }, - "Enable": { - "name": "OpsiSeaMiles.Enable.name", - "help": "OpsiSeaMiles.Enable.help", - "True": "True", - "False": "False" - } - }, "OpsiFleetAutoChange": { "_info": { "name": "OpsiFleetAutoChange._info.name", diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index d04af695a..ba0289bd3 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -3661,18 +3661,6 @@ "help": "当检测到满经验后,将本任务推迟指定的时间" } }, - "OpsiSeaMiles": { - "_info": { - "name": "海里数检测", - "help": "在经验检测完成后检测并记录海里数\n海里数将显示在统计页面的体力变化曲线中" - }, - "Enable": { - "name": "启用海里数检测", - "help": "开启后将在经验检测完成后检测并记录海里数", - "True": "已启用", - "False": "未启用" - } - }, "OpsiFleetAutoChange": { "_info": { "name": "侵蚀一舰队自动配队", diff --git a/module/config/i18n/zh-MIAO.json b/module/config/i18n/zh-MIAO.json index 74c6af38d..6468c18bf 100644 --- a/module/config/i18n/zh-MIAO.json +++ b/module/config/i18n/zh-MIAO.json @@ -3661,18 +3661,6 @@ "help": "检测到满经验后将本任务推迟指定时间喵。" } }, - "OpsiSeaMiles": { - "_info": { - "name": "OpsiSeaMiles._info.name", - "help": "OpsiSeaMiles._info.help" - }, - "Enable": { - "name": "OpsiSeaMiles.Enable.name", - "help": "OpsiSeaMiles.Enable.help", - "True": "True", - "False": "False" - } - }, "OpsiFleetAutoChange": { "_info": { "name": "OpsiFleetAutoChange._info.name", diff --git a/module/config/i18n/zh-TW.json b/module/config/i18n/zh-TW.json index c73a1a0f9..320969421 100644 --- a/module/config/i18n/zh-TW.json +++ b/module/config/i18n/zh-TW.json @@ -3661,18 +3661,6 @@ "help": "當檢測到滿經驗後,將本任務推遲指定的時間" } }, - "OpsiSeaMiles": { - "_info": { - "name": "OpsiSeaMiles._info.name", - "help": "OpsiSeaMiles._info.help" - }, - "Enable": { - "name": "OpsiSeaMiles.Enable.name", - "help": "OpsiSeaMiles.Enable.help", - "True": "True", - "False": "False" - } - }, "OpsiFleetAutoChange": { "_info": { "name": "OpsiFleetAutoChange._info.name", diff --git a/module/os/tasks/hazard_leveling.py b/module/os/tasks/hazard_leveling.py index ed62db744..557d8211e 100644 --- a/module/os/tasks/hazard_leveling.py +++ b/module/os/tasks/hazard_leveling.py @@ -507,16 +507,15 @@ def os_check_leveling(self): content=f"<{self.config.config_name}>\n\n{report}", ) - if hasattr(self.config, 'OpsiSeaMiles_Enable') and self.config.OpsiSeaMiles_Enable: - logger.info("启用海里数检测") - try: - sea_miles = self.detect_and_record_sea_miles() - if sea_miles is not None: - logger.info(f"海里数检测完成: {sea_miles}") - else: - logger.warning("海里数检测失败,但不影响后续流程") - except Exception as e: - logger.error(f"海里数检测异常: {e},但不影响后续流程") + logger.info("开始海里数检测") + try: + sea_miles = self.detect_and_record_sea_miles() + if sea_miles is not None: + logger.info(f"海里数检测完成: {sea_miles}") + else: + logger.warning("海里数检测失败,但不影响后续流程") + except Exception as e: + logger.error(f"海里数检测异常: {e},但不影响后续流程") if enable_custom_check and custom_positions: self._check_custom_positions_full_exp(