From 3c970a830417cae720df941d17b2f553aa887653 Mon Sep 17 00:00:00 2001 From: Shawnsdaddy Date: Wed, 16 Oct 2024 23:04:53 -0700 Subject: [PATCH] =?UTF-8?q?702=20=E9=98=B2=E6=AD=A2=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=88=AA=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arknights_mower/solvers/base_schedule.py | 9 ++++++--- arknights_mower/utils/recognize.py | 2 -- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arknights_mower/solvers/base_schedule.py b/arknights_mower/solvers/base_schedule.py index 1dd41389..ce777003 100644 --- a/arknights_mower/solvers/base_schedule.py +++ b/arknights_mower/solvers/base_schedule.py @@ -1250,7 +1250,7 @@ def plan_run_order(self, room): in_out_plan[room][idx] = x.replacement[0] self.tasks.append( SchedulerTask( - time=self.get_run_roder_time(room), + time=self.get_run_order_time(room), task_plan=in_out_plan, task_type=TaskTypes.RUN_ORDER, meta_data=room, @@ -1711,7 +1711,7 @@ def check_fia(self): ].replacement, self.op_data.operators["菲亚梅塔"].room return None, None - def get_run_roder_time(self, room): + def get_run_order_time(self, room): logger.info("基建:读取插拔时间") # 点击进入该房间 self.enter_room(room) @@ -3112,10 +3112,13 @@ def agent_arrange(self, plan: tp.BasePlan, get_time=False): self.sleep(0.5) wait += 1 # 接受当前订单 + not_take = True while ( self.find("order_ready", scope=((450, 675), (600, 750))) is not None ): - self.recog.save_screencap("run_order") + if not_take: + self.recog.save_screencap("run_order") + not_take = False self.tap((self.recog.w * 0.25, self.recog.h * 0.25), interval=0.5) if self.drone_room is None or ( self.drone_room == room and room in self.op_data.run_order_rooms diff --git a/arknights_mower/utils/recognize.py b/arknights_mower/utils/recognize.py index ffa681b5..759474dc 100644 --- a/arknights_mower/utils/recognize.py +++ b/arknights_mower/utils/recognize.py @@ -9,7 +9,6 @@ from arknights_mower.utils import config from arknights_mower.utils import typealias as tp from arknights_mower.utils.csleep import MowerExit -from arknights_mower.utils.deprecated import deprecated from arknights_mower.utils.device.device import Device from arknights_mower.utils.image import bytes2img, cmatch, cropimg, loadres, thres2 from arknights_mower.utils.log import logger, save_screenshot @@ -95,7 +94,6 @@ def color(self, x: int, y: int) -> tp.Pixel: """get the color of the pixel""" return self.img[y][x] - @deprecated def save_screencap(self, folder): # del folder # 兼容2024.05旧版接口 save_screenshot(self.screencap, folder)