From 8108b003180fb16313c10042c2159ff01e7d3b9e Mon Sep 17 00:00:00 2001 From: Snowdash Date: Sun, 9 Apr 2023 12:13:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 怎么会有人不知道自己写的啥键名( --- diy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diy.py b/diy.py index 02c124428..455410a45 100644 --- a/diy.py +++ b/diy.py @@ -15,8 +15,8 @@ 'pass_code':'xxx', # 收件人邮箱 'receipts':['任何邮箱'], - # 是否提醒,暂时没用 - 'notify':False, + # 是否启用邮件提醒 + 'mail_enable':False, # 邮件主题 'subject': '任务数据' } From d103d765645369a96205280e97ec98d8819c3750 Mon Sep 17 00:00:00 2001 From: Shawnsdaddy Date: Thu, 13 Apr 2023 17:52:30 -0700 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arknights_mower/solvers/base_schedule.py | 6 ++++-- arknights_mower/utils/operators.py | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arknights_mower/solvers/base_schedule.py b/arknights_mower/solvers/base_schedule.py index 28770fced..1345155bb 100644 --- a/arknights_mower/solvers/base_schedule.py +++ b/arknights_mower/solvers/base_schedule.py @@ -1374,13 +1374,15 @@ def get_agent_from_room(self, room, read_time_index=None): _mood = 24 # 如果房间不为空 if _name != '': - if _name not in self.op_data.operators.keys(): + if _name not in self.op_data.operators.keys() and _name in agent_list: self.op_data.add(Operator(_name, "")) + update_time=False if self.op_data.operators[_name].need_to_refresh(): _mood = self.read_screen(self.recog.img, cord=mood_p[i], change_color=True) + update_time = True else: _mood = self.op_data.operators[_name].mood - high_no_time = self.op_data.update_detail(_name, _mood, room, i) + high_no_time = self.op_data.update_detail(_name, _mood, room, i,update_time) if high_no_time is not None: logger.debug(f"检测到高效组休息时间数据不存在:{room},{high_no_time}") read_time_index.append(high_no_time) diff --git a/arknights_mower/utils/operators.py b/arknights_mower/utils/operators.py index 96741e621..0be832d24 100644 --- a/arknights_mower/utils/operators.py +++ b/arknights_mower/utils/operators.py @@ -20,10 +20,10 @@ def __init__(self, config,max_resting_count): self.dorm = [] self.max_resting_count = max_resting_count - def update_detail(self,name, mood, current_room, current_index): + def update_detail(self,name, mood, current_room, current_index,update_time = False): agent = self.operators[name] - - agent.time_stamp = datetime.now() + if update_time: + agent.time_stamp = datetime.now() # 如果移出宿舍,则清除对应宿舍数据 且重新记录高效组心情 if agent.current_room.startswith('dorm') and not current_room.startswith('dorm') and agent.is_high(): self.refresh_dorm_time(agent.current_room,agent.current_index,{'agent':''})