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':''}) diff --git a/diy.py b/diy.py index 1892b2b4c..82f958495 100644 --- a/diy.py +++ b/diy.py @@ -15,8 +15,8 @@ 'pass_code':'xxx', # 收件人邮箱 'receipts':['任何邮箱'], - # 是否提醒,暂时没用 - 'notify':False, + # 是否启用邮件提醒 + 'mail_enable':False, # 邮件主题 'subject': '任务数据' }