Skip to content

Commit

Permalink
improve 排班表验证
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawnsdaddy committed Sep 14, 2023
1 parent 01e7b70 commit 036e04a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arknights_mower/utils/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def init_and_validate(self, update=False):
return f'高效组不可用龙舌兰,但书 房间->{room}, 干员->{data.agent}'
if data.agent == '菲亚梅塔' and idx == 1:
return f'菲亚梅塔不能安排在2号位置 房间->{room}, 干员->{data.agent}'
if data.agent == '菲亚梅塔' and not room.startswith('dorm'):
return f'菲亚梅塔必须安排在宿舍'
if data.agent == 'Free' and not room.startswith('dorm'):
return f'Free只能安排在宿舍 房间->{room}, 干员->{data.agent}'
if data.agent in self.operators and data.agent != "Free":
Expand All @@ -96,7 +98,7 @@ def init_and_validate(self, update=False):
r_count = len(data.replacement)
if "龙舌兰" in data.replacement or "但书" in data.replacement:
r_count -= 1
if r_count <= 0 and data.agent != 'Free' and (not room.startswith("dorm")):
if r_count <= 0 and ((data.agent != 'Free' and (not room.startswith("dorm"))) or data.agent == "菲亚梅塔"):
missing_replacements.append(data.agent)
for _replacement in data.replacement:
if _replacement not in agent_list and data.agent != 'Free':
Expand Down

0 comments on commit 036e04a

Please sign in to comment.