From cdef46d9673bca3147401a8ed181c93171350a0f Mon Sep 17 00:00:00 2001 From: Zhao Zuohong Date: Sun, 1 Oct 2023 02:54:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D=E4=B8=8D?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E6=8F=92=E6=8B=94=E6=A3=80=E6=B5=8B=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arknights_mower/solvers/base_schedule.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arknights_mower/solvers/base_schedule.py b/arknights_mower/solvers/base_schedule.py index ad17de8a0..f06bc7443 100644 --- a/arknights_mower/solvers/base_schedule.py +++ b/arknights_mower/solvers/base_schedule.py @@ -1953,16 +1953,16 @@ def agent_arrange(self, plan: tp.BasePlan, get_time=False): for current_idx, _name in enumerate(plan[room]): if _name == 'Current': plan[room][current_idx] = self.op_data.get_current_room(room, True)[current_idx] - if room in self.op_data.run_order_rooms and len( - new_plan) == 0 and self.task.type != TaskTypes.RUN_ORDER: - if plan[room] != self.op_data.get_current_room(room): - logger.debug("检测到插拔房间人员变动!") - run_order_task = find_next_task(self.tasks, datetime.now() + timedelta(minutes=5), - task_type=TaskTypes.RUN_ORDER, - meta_data=room, compare_type=">") - if run_order_task is not None: - logger.info("移除超过5分钟的跑单任务以刷新时间") - self.tasks.remove(run_order_task) + if room in self.op_data.run_order_rooms and len( + new_plan) == 0 and self.task.type != TaskTypes.RUN_ORDER: + if plan[room] != self.op_data.get_current_room(room): + logger.debug("检测到插拔房间人员变动!") + run_order_task = find_next_task(self.tasks, datetime.now() + timedelta(minutes=5), + task_type=TaskTypes.RUN_ORDER, + meta_data=room, compare_type=">") + if run_order_task is not None: + logger.info("移除超过5分钟的跑单任务以刷新时间") + self.tasks.remove(run_order_task) checked = True current_room = self.op_data.get_current_room(room, True) same = len(plan[room]) == len(current_room)