Fix: EMPTY_SLOT search & undispatched if event

This commit is contained in:
Zebartin 2023-09-26 21:08:17 +08:00
parent 2c31967195
commit aad72ea533
4 changed files with 4 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -186,7 +186,7 @@ EMPTY_SLOT = ButtonWrapper(
share=Button( share=Button(
file='./assets/share/assignment/dispatch/EMPTY_SLOT.png', file='./assets/share/assignment/dispatch/EMPTY_SLOT.png',
area=(1075, 562, 1110, 597), area=(1075, 562, 1110, 597),
search=(873, 543, 1099, 609), search=(873, 542, 1136, 608),
color=(200, 200, 195), color=(200, 200, 195),
button=(1075, 562, 1110, 597), button=(1075, 562, 1110, 597),
), ),

View File

@ -42,9 +42,9 @@ class Assignment(AssignmentClaim, SynthesizeUI):
if isinstance(g, AssignmentEventGroup) if isinstance(g, AssignmentEventGroup)
), None) ), None)
if event_first and event_ongoing is not None: if event_first and event_ongoing is not None:
undispatched = assignments
remain = self._check_all() remain = self._check_all()
remain = self._dispatch_event(remain) remain = self._dispatch_event(remain)
undispatched = [x for x in assignments if x not in self.dispatched]
else: else:
# Iterate in user-specified order, return undispatched ones # Iterate in user-specified order, return undispatched ones
undispatched = list(self._check_inlist(assignments, duration)) undispatched = list(self._check_inlist(assignments, duration))

View File

@ -92,7 +92,8 @@ class AssignmentDispatch(AssignmentUI):
logger.info('Characters are all selected') logger.info('Characters are all selected')
break break
# Ensure character list # Ensure character list
if not self.appear(CHARACTER_LIST): # Search EMPTY_SLOT to load offset
if not self.appear(CHARACTER_LIST) and self.appear(EMPTY_SLOT):
if self.interval_is_reached(CHARACTER_LIST, interval=2): if self.interval_is_reached(CHARACTER_LIST, interval=2):
self.interval_reset(CHARACTER_LIST, interval=2) self.interval_reset(CHARACTER_LIST, interval=2)
self.device.click(EMPTY_SLOT) self.device.click(EMPTY_SLOT)