Skip to content

Commit

Permalink
Merge branch 'dev_shawn' of github.com:ArkMowers/arknights-mower into…
Browse files Browse the repository at this point in the history
… dev_shawn
  • Loading branch information
ZhaoZuohong committed Oct 3, 2023
2 parents b097b6e + f0ff067 commit cf797c1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arknights_mower/solvers/base_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ def infra_main(self):
if self.reload_room is not None and (
self.reload_time is None or self.reload_time < datetime.now() - timedelta(hours=24)):
self.reload()
logger.info(f"记录本次补货时间为:{datetime.now()}")
self.todo_task = True
elif not self.collect_notification:
notification = detector.infra_notification(self.recog.img)
Expand Down Expand Up @@ -1983,8 +1984,7 @@ def agent_arrange_room(self, new_plan, room, plan, skip_enter=False, get_time=Fa
logger.info(f"检测到漏单")
self.recog.save_screencap("run_order_failure")
self.send_email("检测到漏单!")
self.back_to_index()
return
raise Exception("检测到漏单!")
while self.find('arrange_order_options') is None:
if error_count > 3:
raise Exception('未成功进入干员选择界面')
Expand Down Expand Up @@ -2040,6 +2040,8 @@ 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:
Expand Down Expand Up @@ -2131,6 +2133,7 @@ def reload(self):
error = False
for room in self.reload_room:
try:
logger.info(f"开始搓玉补货:{room}")
self.enter_room(room)
self.tap((self.recog.w * 0.05, self.recog.h * 0.95), interval=0.5)
# 补货
Expand Down

0 comments on commit cf797c1

Please sign in to comment.