From 64ac9ab9fede6d12d37157f80a7fa88cb3e264ff Mon Sep 17 00:00:00 2001 From: 0O0o0oOoO00 <11174151+0O0o0oOoO00@users.noreply.github.com> Date: Thu, 18 Sep 2025 22:50:00 +0800 Subject: [PATCH] add: migrate higher priority of OpsiHazard1Leveling --- config/template.json | 1 + module/config/argument/args.json | 4 ++++ module/config/argument/argument.yaml | 1 + module/config/config.py | 11 +++++++++++ module/config/config_generated.py | 1 + module/config/full_config_generated.py | 1 + module/config/i18n/en-US.json | 4 ++++ module/config/i18n/ja-JP.json | 4 ++++ module/config/i18n/zh-CN.json | 4 ++++ module/config/i18n/zh-TW.json | 4 ++++ 10 files changed, 35 insertions(+) diff --git a/config/template.json b/config/template.json index 144389f7b..a985e7d44 100644 --- a/config/template.json +++ b/config/template.json @@ -2584,6 +2584,7 @@ "ServerUpdate": "00:00, 12:00" }, "OpsiHazard1Leveling": { + "HigherPriority": false, "TargetZone": 0 }, "OpsiFleet": { diff --git a/module/config/argument/args.json b/module/config/argument/args.json index 99e9bfb51..ff4738d54 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -16593,6 +16593,10 @@ } }, "OpsiHazard1Leveling": { + "HigherPriority": { + "type": "checkbox", + "value": false + }, "TargetZone": { "type": "select", "value": 0, diff --git a/module/config/argument/argument.yaml b/module/config/argument/argument.yaml index c200fe6d5..acf972a3b 100644 --- a/module/config/argument/argument.yaml +++ b/module/config/argument/argument.yaml @@ -743,6 +743,7 @@ OpsiMeowfficerFarming: TargetZone: value: 0 OpsiHazard1Leveling: + HigherPriority: false TargetZone: value: 0 option: [ 0, 44, 22 ] diff --git a/module/config/config.py b/module/config/config.py index a398c33de..8bf4aaf05 100644 --- a/module/config/config.py +++ b/module/config/config.py @@ -830,3 +830,14 @@ class AzurLaneConfig(AzurLaneConfig): interval=full_config.Restart_OthersLogin_Interval, need_notify=full_config.Restart_OthersLogin_Notify, ) + + def get_next_task(self): + super().get_next_task() + if self.full_config.OpsiHazard1Leveling_OpsiHazard1Leveling_HigherPriority: + pending_tasks = [f.command for f in self.pending_task] + if len(self.pending_task) == 2 \ + and self.is_task_enabled("GemsFarming") \ + and self.is_task_enabled("OpsiHazard1Leveling") \ + and "GemsFarming" in pending_tasks \ + and "OpsiHazard1Leveling" in pending_tasks: + self.pending_task.reverse() diff --git a/module/config/config_generated.py b/module/config/config_generated.py index a830a24c5..a04975a48 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -444,6 +444,7 @@ class GeneratedConfig: OpsiMeowfficerFarming_TargetZone = 0 # Group `OpsiHazard1Leveling` + OpsiHazard1Leveling_HigherPriority = False OpsiHazard1Leveling_TargetZone = 0 # 0, 44, 22 # Group `Daemon` diff --git a/module/config/full_config_generated.py b/module/config/full_config_generated.py index de6951d5e..dfe43c294 100644 --- a/module/config/full_config_generated.py +++ b/module/config/full_config_generated.py @@ -1877,6 +1877,7 @@ class FullGeneratedConfig: OpsiHazard1Leveling_Scheduler_SuccessInterval = None OpsiHazard1Leveling_Scheduler_FailureInterval = None OpsiHazard1Leveling_Scheduler_ServerUpdate = None + OpsiHazard1Leveling_OpsiHazard1Leveling_HigherPriority = None OpsiHazard1Leveling_OpsiHazard1Leveling_TargetZone = None OpsiHazard1Leveling_OpsiFleet_Fleet = None OpsiHazard1Leveling_OpsiFleet_Submarine = None diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index ab55b91fb..b4ac65f77 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -2613,6 +2613,10 @@ "name": "CL1 leveling", "help": "Consume operation coins to gain a lot of experience and a little action points.\nRecommended to carry 1-2 pre-loaded CV to obtain the highest average hourly benefit.\n\nTo avoid being unable to buying goods from port shops, Alas will retain 100,000 operation coins\nSince buying action points at the mystery shop requires a large number of operation coins, this function will be supplemented by running meowfficer farming with overflow action points." }, + "HigherPriority": { + "name": "OpsiHazard1Leveling.HigherPriority.name", + "help": "OpsiHazard1Leveling.HigherPriority.help" + }, "TargetZone": { "name": "Target Zone ID", "help": "Only attack target zone, which can be used to avoid the event that the map cannot be refreshed due to game bug", diff --git a/module/config/i18n/ja-JP.json b/module/config/i18n/ja-JP.json index 016423fb5..60f3f25cf 100644 --- a/module/config/i18n/ja-JP.json +++ b/module/config/i18n/ja-JP.json @@ -2613,6 +2613,10 @@ "name": "OpsiHazard1Leveling._info.name", "help": "OpsiHazard1Leveling._info.help" }, + "HigherPriority": { + "name": "OpsiHazard1Leveling.HigherPriority.name", + "help": "OpsiHazard1Leveling.HigherPriority.help" + }, "TargetZone": { "name": "OpsiHazard1Leveling.TargetZone.name", "help": "OpsiHazard1Leveling.TargetZone.help", diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index 49a9856d3..d24f39b60 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -2613,6 +2613,10 @@ "name": "侵蚀1练级", "help": "消耗作战补给凭证以获取大量经验和少量行动力\n推荐携带1-2艘预装填航母以获取最高的时均收益\n\n为了避免无法购买港口商店的商品,Alas会保留100000作战补给凭证\n由于在神秘商店购买行动力需要大量作战补给凭证,启用本功能后会使用溢出行动力运行短猫相接来补充" }, + "HigherPriority": { + "name": "更高优先级", + "help": "开启后会将优先级调整到紧急委托前面" + }, "TargetZone": { "name": "指定海域", "help": "仅出击指定的海域,可以用来规避游戏BUG导致的无法刷新海域", diff --git a/module/config/i18n/zh-TW.json b/module/config/i18n/zh-TW.json index d95d9f940..34813b82a 100644 --- a/module/config/i18n/zh-TW.json +++ b/module/config/i18n/zh-TW.json @@ -2613,6 +2613,10 @@ "name": "侵蝕1練級", "help": "消耗作戰補給憑證以獲取大量經驗和少量行動力\n推薦攜帶1-2艘預裝填航母以獲取最高的時均收益\n\n為了避免無法購買港口商店的商品,Alas會保留100000作戰補給憑證\n由於在神秘商店購買行動力需要大量作戰補給憑證,啟用本功能後會使用溢出行動力運行短猫相接來補充" }, + "HigherPriority": { + "name": "OpsiHazard1Leveling.HigherPriority.name", + "help": "OpsiHazard1Leveling.HigherPriority.help" + }, "TargetZone": { "name": "指定海域", "help": "僅出擊指定的海域,可以用來規避遊戲BUG導致的無法重繪海域",