From e3de9aa5486da267dfef9c2036746aa78b82d07e Mon Sep 17 00:00:00 2001 From: Shawnsdaddy Date: Mon, 10 Apr 2023 23:21:37 -0700 Subject: [PATCH 1/2] =?UTF-8?q?fix=EF=BC=9A=E5=8D=95=E4=BA=BA=E7=BB=84?= =?UTF-8?q?=E4=B8=8A=E7=8F=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arknights_mower/solvers/base_schedule.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/arknights_mower/solvers/base_schedule.py b/arknights_mower/solvers/base_schedule.py index bf4f5c395..0ef68bc02 100644 --- a/arknights_mower/solvers/base_schedule.py +++ b/arknights_mower/solvers/base_schedule.py @@ -423,17 +423,19 @@ def agent_get_mood(self, skip_dorm=False, force=False): miss_list = {k: v for (k, v) in self.op_data.operators.items() if v.not_valid()} if len(miss_list.keys()) > 0: # 替换到他应该的位置 - logger.debug(f"高效组心情没有记录 或者高效组在宿舍{str(miss_list)}") + logger.debug(f"高效组心情没有记录{str(miss_list)}") for key in miss_list: _agent = miss_list[key] - if _agent.group != '' and _agent.current_room.startswith("dorm"): - # 如果还有其他小组成员在休息且没满心情则忽略 - if next((k for k, v in self.op_data.operators.items() if - v.group == _agent.group and not v.not_valid() and v.current_room.startswith( - "dorm")), None) is not None: - continue + if _agent.group != '': + # 把所有小组成员都移到工作站 + agents = self.op_data.groups[_agent.group] + for a in agents: + __agent = self.op_data.operators[a] + if __agent.room not in fix_plan.keys(): + fix_plan[__agent.room] = ['Current'] * len(self.currentPlan[__agent.room]) + fix_plan[__agent.room][__agent.index] = a if _agent.room not in fix_plan.keys(): - fix_plan[_agent.room] = ['Current'] * len(current_base[_agent.room]) + fix_plan[_agent.room] = ['Current'] * len(self.currentPlan[_agent.room]) fix_plan[_agent.room][_agent.index] = key # 如果是错位: if (_agent.current_index != -1 and _agent.current_index != _agent.index) or (_agent.current_room !=""and _agent.room != _agent.current_room): From 8c90249932b49e50bb4ec8e050e33e2471e49e6c Mon Sep 17 00:00:00 2001 From: Shawnsdaddy Date: Tue, 11 Apr 2023 22:17:01 -0700 Subject: [PATCH 2/2] =?UTF-8?q?revert:=20=E5=A6=82=E6=9E=9C=E6=9C=89?= =?UTF-8?q?=E5=BF=83=E6=83=85=E6=9C=AA=E6=BB=A1=E5=88=99=E8=B7=B3=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arknights_mower/solvers/base_schedule.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arknights_mower/solvers/base_schedule.py b/arknights_mower/solvers/base_schedule.py index 0ef68bc02..a338a6a56 100644 --- a/arknights_mower/solvers/base_schedule.py +++ b/arknights_mower/solvers/base_schedule.py @@ -426,7 +426,13 @@ def agent_get_mood(self, skip_dorm=False, force=False): logger.debug(f"高效组心情没有记录{str(miss_list)}") for key in miss_list: _agent = miss_list[key] - if _agent.group != '': + if _agent.group != '' and _agent.current_room.startswith("dorm"): + # 如果还有其他小组成员在休息且没满心情则忽略 + if next((k for k, v in self.op_data.operators.items() if + v.group == _agent.group and not v.not_valid() and v.current_room.startswith( + "dorm")), None) is not None: + continue + elif _agent.group != '': # 把所有小组成员都移到工作站 agents = self.op_data.groups[_agent.group] for a in agents: