Ver código fonte

feat(SixRealms): 六道删除双御魂配置(需手动更新御魂配置)

- 删除重复的 switch_soul_config_1 和 switch_soul_config_2 配置项
- 将两个配置合并为单个 switch_soul_config 配置项
- 更新任务脚本中的配置引用以使用新的单一配置
- 移除重复的御魂切换逻辑代码
AzurTian 6 meses atrás
pai
commit
2ac9db61bd
2 arquivos alterados com 5 adições e 20 exclusões
  1. 1 2
      tasks/SixRealms/config.py
  2. 4 18
      tasks/SixRealms/script_task.py

+ 1 - 2
tasks/SixRealms/config.py

@@ -17,8 +17,7 @@ class SixRealmsGate(BaseModel):
 
 class SixRealms(ConfigBase):
     scheduler: Scheduler = Field(default_factory=Scheduler)
-    switch_soul_config_1: SwitchSoulConfig = Field(default_factory=SwitchSoulConfig)
-    switch_soul_config_2: SwitchSoulConfig = Field(default_factory=SwitchSoulConfig)
+    switch_soul_config: SwitchSoulConfig = Field(default_factory=SwitchSoulConfig)
     six_realms_gate: SixRealmsGate = Field(default_factory=SixRealmsGate)
 
 

+ 4 - 18
tasks/SixRealms/script_task.py

@@ -31,28 +31,14 @@ class ScriptTask(GameUi, SwitchSoul, MoonSea):
         return self.config.model.six_realms
 
     def run(self):
-        if self._config.switch_soul_config_1.enable:
+        if self._config.switch_soul_config.enable:
             self.ui_get_current_page()
             self.ui_goto(page_shikigami_records)
-            self.run_switch_soul(self._config.switch_soul_config_1.switch_group_team)
-        if self._config.switch_soul_config_1.enable_switch_by_name:
+            self.run_switch_soul(self._config.switch_soul_config.switch_group_team)
+        if self._config.switch_soul_config.enable_switch_by_name:
             self.ui_get_current_page()
             self.ui_goto(page_shikigami_records)
-            self.run_switch_soul_by_name(
-                self._config.switch_soul_config_1.group_name,
-                self._config.switch_soul_config_1.team_name
-            )
-        if self._config.switch_soul_config_2.enable:
-            self.ui_get_current_page()
-            self.ui_goto(page_shikigami_records)
-            self.run_switch_soul(self._config.switch_soul_config_2.switch_group_team)
-        if self._config.switch_soul_config_2.enable_switch_by_name:
-            self.ui_get_current_page()
-            self.ui_goto(page_shikigami_records)
-            self.run_switch_soul_by_name(
-                self._config.switch_soul_config_2.group_name,
-                self._config.switch_soul_config_2.team_name
-            )
+            self.run_switch_soul_by_name(self._config.switch_soul_config.group_name, self._config.switch_soul_config.team_name)
         self.ui_get_current_page()
         self.ui_goto(page_six_gates)