Fix: Change of assignment ui in ver 1.3

This commit is contained in:
Zebartin 2023-08-31 14:42:33 +08:00
parent 893e8e3589
commit c9111273b8
6 changed files with 10 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@ -27,10 +27,10 @@ OCR_ASSIGNMENT_REPORT_TIME = ButtonWrapper(
name='OCR_ASSIGNMENT_REPORT_TIME', name='OCR_ASSIGNMENT_REPORT_TIME',
share=Button( share=Button(
file='./assets/share/assignment/claim/OCR_ASSIGNMENT_REPORT_TIME.png', file='./assets/share/assignment/claim/OCR_ASSIGNMENT_REPORT_TIME.png',
area=(894, 191, 1003, 216), area=(870, 222, 1002, 247),
search=(874, 171, 1023, 236), search=(850, 202, 1022, 267),
color=(62, 63, 63), color=(57, 57, 60),
button=(894, 191, 1003, 216), button=(870, 222, 1002, 247),
), ),
) )
REDISPATCH = ButtonWrapper( REDISPATCH = ButtonWrapper(

View File

@ -3,10 +3,9 @@ from datetime import datetime, timedelta
from module.logger import logger from module.logger import logger
from module.ocr.ocr import Duration from module.ocr.ocr import Duration
from tasks.assignment.assets.assets_assignment_claim import * from tasks.assignment.assets.assets_assignment_claim import *
from tasks.assignment.assets.assets_assignment_dispatch import EMPTY_SLOT
from tasks.assignment.assets.assets_assignment_ui import DISPATCHED
from tasks.assignment.dispatch import AssignmentDispatch from tasks.assignment.dispatch import AssignmentDispatch
from tasks.assignment.keywords import AssignmentEntry from tasks.assignment.keywords import AssignmentEntry
from tasks.base.page import page_assignment
class AssignmentClaim(AssignmentDispatch): class AssignmentClaim(AssignmentDispatch):
@ -32,6 +31,7 @@ class AssignmentClaim(AssignmentDispatch):
) + timedelta(hours=duration_expected) ) + timedelta(hours=duration_expected)
elif should_redispatch: elif should_redispatch:
# Re-select duration and dispatch # Re-select duration and dispatch
self.goto_entry(assignment)
self.dispatch(assignment, duration_expected) self.dispatch(assignment, duration_expected)
def _wait_for_report(self): def _wait_for_report(self):
@ -61,11 +61,9 @@ class AssignmentClaim(AssignmentDispatch):
Pages: Pages:
in: CLOSE_REPORT and REDISPATCH in: CLOSE_REPORT and REDISPATCH
out: EMPTY_SLOT or DISPATCHED out: page_assignment
""" """
click_button, check_button = CLOSE_REPORT, EMPTY_SLOT click_button = REDISPATCH if should_redispatch else CLOSE_REPORT
if should_redispatch:
click_button, check_button = REDISPATCH, DISPATCHED
skip_first_screenshot = True skip_first_screenshot = True
while 1: while 1:
if skip_first_screenshot: if skip_first_screenshot:
@ -73,7 +71,7 @@ class AssignmentClaim(AssignmentDispatch):
else: else:
self.device.screenshot() self.device.screenshot()
# End # End
if self.appear(check_button): if self.appear(page_assignment.check_button):
logger.info('Assignment report is closed') logger.info('Assignment report is closed')
break break
# Close report # Close report

View File

@ -43,6 +43,7 @@ class AssignmentOcr(Ocr):
(KEYWORDS_ASSIGNMENT_ENTRY.Root_Out_the_Turpitude.name, (KEYWORDS_ASSIGNMENT_ENTRY.Root_Out_the_Turpitude.name,
'根除恶[擎薯尊掌鞋]?'), '根除恶[擎薯尊掌鞋]?'),
(KEYWORDS_ASSIGNMENT_ENTRY.Akashic_Records.name, '阿[未][夏复]记录'), (KEYWORDS_ASSIGNMENT_ENTRY.Akashic_Records.name, '阿[未][夏复]记录'),
(KEYWORDS_ASSIGNMENT_ENTRY.The_Wages_of_Humanity.name, '[赠]养人类'),
] ]
} }

View File

@ -94,7 +94,6 @@ class CombatState(UI):
self._combat_auto_checked = True self._combat_auto_checked = True
else: else:
if self._combat_click_interval.reached(): if self._combat_click_interval.reached():
self.device.image_save()
self.device.click(COMBAT_AUTO) self.device.click(COMBAT_AUTO)
self._combat_click_interval.reset() self._combat_click_interval.reset()
return True return True

View File

@ -185,7 +185,6 @@ class ForgottenHallUI(DungeonUI):
timeout.reset() timeout.reset()
if interval.reached() and self._forgotten_hall_enter_appear(): if interval.reached() and self._forgotten_hall_enter_appear():
self.device.image_save()
self.device.click(ENTER_FORGOTTEN_HALL_DUNGEON) self.device.click(ENTER_FORGOTTEN_HALL_DUNGEON)
interval.reset() interval.reset()