Skip to content

Commit

Permalink
新增替班验证
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawnsdaddy committed Nov 10, 2023
1 parent 32f7486 commit 7e0fe01
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arknights_mower/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,14 @@ def simulate():
base_scheduler.op_data.operators[k].current_room = v.current_room
base_scheduler.op_data.operators[k].current_index = v.current_index
timezone_offset = 0

if len(base_scheduler.op_data.backup_plans) > 0:
for idx, backplan in enumerate(base_scheduler.op_data.backup_plans):
validation_msg = base_scheduler.op_data.swap_plan(idx, True)
if validation_msg is not None:
logger.error(f"替换排班验证错误:{validation_msg}")
return
base_scheduler.op_data.swap_plan(-1, True)
while True:
try:
if len(base_scheduler.tasks) > 0:
Expand Down

0 comments on commit 7e0fe01

Please sign in to comment.