Skip to content

Commit

Permalink
修复选人出错死循环
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawnsdaddy committed Oct 7, 2023
1 parent ba14d9a commit 1f0d790
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions arknights_mower/solvers/base_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -2043,6 +2043,10 @@ def agent_arrange_room(self, new_plan, room, plan, skip_enter=False, get_time=Fa
choose_error += 1
self.recog.update()
self.recog.save_screencap('choose_agent_failure')
if "检测到漏单!" in str(e):
return {}
if choose_error > 3:
raise e
if "检测到安排干员未成功" in str(e):
skip_enter = True
continue
Expand All @@ -2052,12 +2056,7 @@ def agent_arrange_room(self, new_plan, room, plan, skip_enter=False, get_time=Fa
back_count += 1
if back_count > 3:
raise e
if "检测到漏单!" in str(e):
return {}
if choose_error > 3:
raise e
else:
continue
continue
if len(new_plan) != 1:
self.back(0.5)
else:
Expand Down

0 comments on commit 1f0d790

Please sign in to comment.