mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Fix: Remove ambiguous REPORT and LOCKED
This commit is contained in:
parent
0adca58643
commit
17fc2979ea
BIN
assets/cn/assignment/claim/REPORT.png
Normal file
BIN
assets/cn/assignment/claim/REPORT.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
BIN
assets/en/assignment/claim/REPORT.png
Normal file
BIN
assets/en/assignment/claim/REPORT.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
Binary file not shown.
Before Width: | Height: | Size: 27 KiB |
Binary file not shown.
Before Width: | Height: | Size: 60 KiB |
@ -45,11 +45,18 @@ REDISPATCH = ButtonWrapper(
|
|||||||
)
|
)
|
||||||
REPORT = ButtonWrapper(
|
REPORT = ButtonWrapper(
|
||||||
name='REPORT',
|
name='REPORT',
|
||||||
share=Button(
|
cn=Button(
|
||||||
file='./assets/share/assignment/claim/REPORT.png',
|
file='./assets/cn/assignment/claim/REPORT.png',
|
||||||
area=(0, 154, 266, 542),
|
area=(537, 80, 742, 128),
|
||||||
search=(0, 134, 286, 562),
|
search=(517, 60, 762, 148),
|
||||||
color=(33, 34, 37),
|
color=(102, 90, 68),
|
||||||
button=(0, 154, 266, 542),
|
button=(537, 80, 742, 128),
|
||||||
|
),
|
||||||
|
en=Button(
|
||||||
|
file='./assets/en/assignment/claim/REPORT.png',
|
||||||
|
area=(393, 83, 885, 137),
|
||||||
|
search=(373, 63, 905, 157),
|
||||||
|
color=(71, 63, 49),
|
||||||
|
button=(393, 83, 885, 137),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -30,16 +30,6 @@ ENTRY_LOADED = ButtonWrapper(
|
|||||||
button=(467, 235, 498, 619),
|
button=(467, 235, 498, 619),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
LOCKED = ButtonWrapper(
|
|
||||||
name='LOCKED',
|
|
||||||
share=Button(
|
|
||||||
file='./assets/share/assignment/ui/LOCKED.png',
|
|
||||||
area=(1051, 480, 1237, 630),
|
|
||||||
search=(1031, 460, 1257, 650),
|
|
||||||
color=(53, 48, 40),
|
|
||||||
button=(1051, 480, 1237, 630),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
OCR_ASSIGNMENT_ENTRY_LIST = ButtonWrapper(
|
OCR_ASSIGNMENT_ENTRY_LIST = ButtonWrapper(
|
||||||
name='OCR_ASSIGNMENT_ENTRY_LIST',
|
name='OCR_ASSIGNMENT_ENTRY_LIST',
|
||||||
share=Button(
|
share=Button(
|
||||||
|
@ -3,7 +3,7 @@ from datetime import datetime
|
|||||||
from module.logger import logger
|
from module.logger import logger
|
||||||
from tasks.assignment.assets.assets_assignment_claim import CLAIM
|
from tasks.assignment.assets.assets_assignment_claim import CLAIM
|
||||||
from tasks.assignment.assets.assets_assignment_dispatch import EMPTY_SLOT
|
from tasks.assignment.assets.assets_assignment_dispatch import EMPTY_SLOT
|
||||||
from tasks.assignment.assets.assets_assignment_ui import DISPATCHED, LOCKED
|
from tasks.assignment.assets.assets_assignment_ui import DISPATCHED
|
||||||
from tasks.assignment.claim import AssignmentClaim
|
from tasks.assignment.claim import AssignmentClaim
|
||||||
from tasks.assignment.keywords import (KEYWORDS_ASSIGNMENT_GROUP,
|
from tasks.assignment.keywords import (KEYWORDS_ASSIGNMENT_GROUP,
|
||||||
AssignmentEntry, AssignmentEventGroup)
|
AssignmentEntry, AssignmentEventGroup)
|
||||||
@ -196,12 +196,13 @@ class Assignment(AssignmentClaim, SynthesizeUI):
|
|||||||
logger.hr('Assignment event', level=2)
|
logger.hr('Assignment event', level=2)
|
||||||
logger.info(f'Check assignment event: {assignment}')
|
logger.info(f'Check assignment event: {assignment}')
|
||||||
self.goto_entry(assignment)
|
self.goto_entry(assignment)
|
||||||
if self.appear(LOCKED):
|
# No need to check dispatched here, should have been checked in _check_all
|
||||||
logger.info('Assignment is locked')
|
|
||||||
break
|
|
||||||
if self.appear(EMPTY_SLOT):
|
if self.appear(EMPTY_SLOT):
|
||||||
self.dispatch(assignment, None)
|
self.dispatch(assignment, None)
|
||||||
remain -= 1
|
remain -= 1
|
||||||
if remain <= 0:
|
if remain <= 0:
|
||||||
return remain
|
return remain
|
||||||
|
continue
|
||||||
|
logger.info('Assignment is locked')
|
||||||
|
break
|
||||||
return remain
|
return remain
|
||||||
|
@ -80,10 +80,8 @@ class AssignmentClaim(AssignmentDispatch):
|
|||||||
logger.info('Assignment report is closed')
|
logger.info('Assignment report is closed')
|
||||||
break
|
break
|
||||||
# Close report
|
# Close report
|
||||||
if self.appear_then_click(click_button, interval=2):
|
if self.appear(REPORT, interval=2):
|
||||||
continue
|
self.device.click(click_button)
|
||||||
# Only for EVENT assignments
|
|
||||||
if self.appear_then_click(REPORT, interval=2):
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
def _is_duration_expected(self, duration: int) -> bool:
|
def _is_duration_expected(self, duration: int) -> bool:
|
||||||
|
Loading…
Reference in New Issue
Block a user