mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-25 10:01:10 +00:00
Merge branch 'master' into dev
This commit is contained in:
commit
12ffb8348b
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
BIN
assets/en/assignment/ui/EVENT_COMPLETED.png
Normal file
BIN
assets/en/assignment/ui/EVENT_COMPLETED.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.5 KiB |
@ -116,16 +116,22 @@ ENTRY_LOADED = ButtonWrapper(
|
||||
button=(474, 161, 491, 615),
|
||||
),
|
||||
)
|
||||
EVENT_FINISHED = ButtonWrapper(
|
||||
name='EVENT_FINISHED',
|
||||
EVENT_COMPLETED = ButtonWrapper(
|
||||
name='EVENT_COMPLETED',
|
||||
cn=Button(
|
||||
file='./assets/cn/assignment/ui/EVENT_FINISHED.png',
|
||||
file='./assets/cn/assignment/ui/EVENT_COMPLETED.png',
|
||||
area=(700, 300, 752, 331),
|
||||
search=(680, 280, 772, 351),
|
||||
color=(223, 215, 195),
|
||||
button=(700, 300, 752, 331),
|
||||
),
|
||||
en=None,
|
||||
en=Button(
|
||||
file='./assets/en/assignment/ui/EVENT_COMPLETED.png',
|
||||
area=(721, 302, 851, 331),
|
||||
search=(701, 282, 871, 351),
|
||||
color=(229, 220, 200),
|
||||
button=(721, 302, 851, 331),
|
||||
),
|
||||
)
|
||||
EXP_MATERIALS_CREDITS_CHECK = ButtonWrapper(
|
||||
name='EXP_MATERIALS_CREDITS_CHECK',
|
||||
|
@ -5,7 +5,7 @@ from tasks.assignment.claim import AssignmentClaim
|
||||
from tasks.assignment.keywords import (KEYWORDS_ASSIGNMENT_GROUP,
|
||||
AssignmentEntry, AssignmentEventEntry,
|
||||
AssignmentEventGroup)
|
||||
from tasks.assignment.ui import AssignmentStatus
|
||||
from tasks.assignment.ui import ASSIGNMENT_ENTRY_LIST, AssignmentStatus
|
||||
from tasks.base.page import page_assignment, page_menu
|
||||
from tasks.daily.keywords import KEYWORDS_DAILY_QUEST
|
||||
from tasks.daily.synthesize import SynthesizeUI
|
||||
@ -33,6 +33,7 @@ class Assignment(AssignmentClaim, SynthesizeUI):
|
||||
|
||||
self.dispatched = dict()
|
||||
self.has_new_dispatch = False
|
||||
ASSIGNMENT_ENTRY_LIST.cur_buttons = []
|
||||
self.ensure_scroll_top(page_menu)
|
||||
self.ui_ensure(page_assignment)
|
||||
event_ongoing = next((
|
||||
|
@ -4,7 +4,7 @@ from module.config.stored.classes import now
|
||||
from module.logger import logger
|
||||
from module.ocr.ocr import Duration
|
||||
from tasks.assignment.assets.assets_assignment_claim import *
|
||||
from tasks.assignment.assets.assets_assignment_ui import EVENT_FINISHED
|
||||
from tasks.assignment.assets.assets_assignment_ui import EVENT_COMPLETED
|
||||
from tasks.assignment.dispatch import AssignmentDispatch
|
||||
from tasks.assignment.keywords import AssignmentEntry
|
||||
from tasks.base.page import page_assignment
|
||||
@ -80,8 +80,8 @@ class AssignmentClaim(AssignmentDispatch):
|
||||
if self.appear(page_assignment.check_button):
|
||||
logger.info('Assignment report is closed')
|
||||
break
|
||||
if self.appear(EVENT_FINISHED):
|
||||
logger.info('Event finished')
|
||||
if self.appear(EVENT_COMPLETED):
|
||||
logger.info('Event completed')
|
||||
return
|
||||
# Close report
|
||||
if self.appear(REPORT, interval=1):
|
||||
|
@ -224,8 +224,8 @@ class AssignmentUI(UI):
|
||||
if timeout.reached():
|
||||
logger.warning('Wait entry loaded timeout')
|
||||
break
|
||||
if self.appear(EVENT_FINISHED):
|
||||
logger.info('Event finished')
|
||||
if self.appear(EVENT_COMPLETED):
|
||||
logger.info('Event completed')
|
||||
break
|
||||
if self.appear(ASSIGNMENT_CHECK) and \
|
||||
self.image_color_count(ENTRY_LOADED, (35, 35, 35), count=800):
|
||||
@ -244,12 +244,13 @@ class AssignmentUI(UI):
|
||||
if timeout.reached():
|
||||
logger.warning('Wait correct entry loaded timeout')
|
||||
break
|
||||
if self.appear(EVENT_FINISHED):
|
||||
logger.info('Event finished')
|
||||
if isinstance(group, AssignmentEventGroup) and self.appear(EVENT_COMPLETED):
|
||||
logger.info('Correct entry loaded')
|
||||
ASSIGNMENT_ENTRY_LIST.cur_buttons = []
|
||||
break
|
||||
|
||||
ASSIGNMENT_ENTRY_LIST.load_rows(self)
|
||||
if all(
|
||||
if ASSIGNMENT_ENTRY_LIST.cur_buttons and all(
|
||||
x.matched_keyword.group == group
|
||||
for x in ASSIGNMENT_ENTRY_LIST.cur_buttons
|
||||
):
|
||||
|
@ -91,8 +91,6 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSuppo
|
||||
support_set = False
|
||||
else:
|
||||
support_set = True
|
||||
# Reset combat_wave_cost, so handle_combat_interact() won't activate before handle_combat_prepare()
|
||||
self.combat_wave_cost = 10
|
||||
logger.info([support_character, support_set])
|
||||
trial = 0
|
||||
while 1:
|
||||
@ -389,6 +387,8 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSuppo
|
||||
finish = self.combat_finish()
|
||||
if self._combat_should_reenter():
|
||||
continue
|
||||
# Reset combat_wave_cost, so handle_combat_interact() won't activate before handle_combat_prepare()
|
||||
self.combat_wave_cost = 10
|
||||
if finish:
|
||||
break
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user