mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Fix: Color count for CHARACTER_x_SELECTED
This commit is contained in:
parent
3b6fdbf554
commit
8e04b0da52
@ -105,11 +105,11 @@ class AssignmentDispatch(AssignmentUI):
|
|||||||
continue
|
continue
|
||||||
# Select
|
# Select
|
||||||
if self.interval_is_reached(CHARACTER_1_SELECTED, interval=2):
|
if self.interval_is_reached(CHARACTER_1_SELECTED, interval=2):
|
||||||
if not self.image_color_count(CHARACTER_1_SELECTED, (240, 240, 240)):
|
if not self.image_color_count(CHARACTER_1_SELECTED, (240, 240, 240), threshold=221, count=160):
|
||||||
self.device.click(CHARACTER_1)
|
self.device.click(CHARACTER_1)
|
||||||
self.interval_reset(CHARACTER_1_SELECTED, interval=2)
|
self.interval_reset(CHARACTER_1_SELECTED, interval=2)
|
||||||
if self.interval_is_reached(CHARACTER_2_SELECTED, interval=2):
|
if self.interval_is_reached(CHARACTER_2_SELECTED, interval=2):
|
||||||
if not self.image_color_count(CHARACTER_2_SELECTED, (240, 240, 240)):
|
if not self.image_color_count(CHARACTER_2_SELECTED, (240, 240, 240), threshold=221, count=160):
|
||||||
self.device.click(CHARACTER_2)
|
self.device.click(CHARACTER_2)
|
||||||
self.interval_reset(CHARACTER_2_SELECTED, interval=2)
|
self.interval_reset(CHARACTER_2_SELECTED, interval=2)
|
||||||
|
|
||||||
@ -126,7 +126,8 @@ class AssignmentDispatch(AssignmentUI):
|
|||||||
# End
|
# End
|
||||||
if self.appear(CONFIRM_ASSIGNMENT):
|
if self.appear(CONFIRM_ASSIGNMENT):
|
||||||
if self.image_color_count(CONFIRM_ASSIGNMENT.button, color=(227, 227, 227), count=1000):
|
if self.image_color_count(CONFIRM_ASSIGNMENT.button, color=(227, 227, 227), count=1000):
|
||||||
logger.info('Characters are all selected (light button)')
|
logger.info(
|
||||||
|
'Characters are all selected (light button)')
|
||||||
break
|
break
|
||||||
if self.appear(CHARACTER_LIST, interval=2):
|
if self.appear(CHARACTER_LIST, interval=2):
|
||||||
# EMPTY_SLOT appeared above
|
# EMPTY_SLOT appeared above
|
||||||
|
Loading…
Reference in New Issue
Block a user