Add simulated challenges to selected uncleared maps

This commit is contained in:
AttilaNet
2026-11-09 08:11:57 +08:00
parent df0259febf
commit f9631c3363
11 changed files with 628 additions and 47 deletions
+8 -2
View File
@@ -1478,9 +1478,14 @@ class Window(ProgressionPages, ActivityPages, W.QMainWindow):
self.login_status.setText("操作失败,调试窗口中保留了请求和响应")
self.engine.auto = False
self.engine.heartbeat_enabled = False
self.monitoring = False
pending = self.engine.battle_journal.pending(self.engine.snapshot) if self.engine.snapshot is not None else None
recovering_map = not self.engine.demo and bool(pending and pending.get("kind") == "map_battle")
self.monitoring = recovering_map
if recovering_map:
self.engine.last_pending_check = time.monotonic()
self.next_poll = self.engine.last_pending_check + 120
self.stop_workflow()
self.report("已停止:" + message)
self.report(("策略已暂停;后台每2分钟核对挑战记录:" if recovering_map else "已停止:") + message)
self.statusBar().showMessage(message)
def read_policy(self):
@@ -2115,6 +2120,7 @@ class Window(ProgressionPages, ActivityPages, W.QMainWindow):
sweep = SweepPolicy(**value.get("sweep_policy", {}))
self.map_rules = copy.deepcopy(sweep.rules)
self.map_enabled.setChecked(sweep.enabled)
self.map_allow_challenge.setChecked(sweep.allow_challenge)
self.map_keep_ti.setValue(sweep.keep_stamina)
self.map_team.setCurrentIndex(max(0, self.map_team.findData(sweep.team)))
self.load_progression_policy(progression)