mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-21 16:28:17 +00:00
Fix: Leave OE before running
This commit is contained in:
parent
216a1bac2f
commit
47a07b0c52
BIN
assets/share/base/main_page/ROGUE_LEAVE_FOR_NOW_OE.png
Normal file
BIN
assets/share/base/main_page/ROGUE_LEAVE_FOR_NOW_OE.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/share/base/page/MAP_EXIT_OE.png
Normal file
BIN
assets/share/base/page/MAP_EXIT_OE.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
@ -23,3 +23,13 @@ ROGUE_LEAVE_FOR_NOW = ButtonWrapper(
|
||||
button=(729, 475, 765, 519),
|
||||
),
|
||||
)
|
||||
ROGUE_LEAVE_FOR_NOW_OE = ButtonWrapper(
|
||||
name='ROGUE_LEAVE_FOR_NOW_OE',
|
||||
share=Button(
|
||||
file='./assets/share/base/main_page/ROGUE_LEAVE_FOR_NOW_OE.png',
|
||||
area=(730, 551, 760, 587),
|
||||
search=(710, 531, 780, 607),
|
||||
color=(63, 52, 40),
|
||||
button=(730, 551, 760, 587),
|
||||
),
|
||||
)
|
||||
|
@ -297,6 +297,16 @@ MAP_EXIT = ButtonWrapper(
|
||||
),
|
||||
],
|
||||
)
|
||||
MAP_EXIT_OE = ButtonWrapper(
|
||||
name='MAP_EXIT_OE',
|
||||
share=Button(
|
||||
file='./assets/share/base/page/MAP_EXIT_OE.png',
|
||||
area=(51, 55, 68, 84),
|
||||
search=(31, 35, 88, 104),
|
||||
color=(141, 140, 141),
|
||||
button=(51, 55, 68, 84),
|
||||
),
|
||||
)
|
||||
MAP_GOTO_WORLD = ButtonWrapper(
|
||||
name='MAP_GOTO_WORLD',
|
||||
share=Button(
|
||||
|
@ -4,8 +4,8 @@ from module.base.timer import Timer
|
||||
from module.exception import GameNotRunningError, GamePageUnknownError
|
||||
from module.logger import logger
|
||||
from module.ocr.ocr import Ocr
|
||||
from tasks.base.assets.assets_base_main_page import ROGUE_LEAVE_FOR_NOW
|
||||
from tasks.base.assets.assets_base_page import CLOSE, MAIN_GOTO_CHARACTER, MAP_EXIT
|
||||
from tasks.base.assets.assets_base_main_page import ROGUE_LEAVE_FOR_NOW, ROGUE_LEAVE_FOR_NOW_OE
|
||||
from tasks.base.assets.assets_base_page import CLOSE, MAIN_GOTO_CHARACTER, MAP_EXIT, MAP_EXIT_OE
|
||||
from tasks.base.main_page import MainPage
|
||||
from tasks.base.page import Page, page_gacha, page_main
|
||||
from tasks.combat.assets.assets_combat_finish import COMBAT_EXIT
|
||||
@ -344,7 +344,6 @@ class UI(MainPage):
|
||||
|
||||
return appear
|
||||
|
||||
|
||||
def is_in_map_exit(self, interval=0):
|
||||
self.device.stuck_record_add(MAP_EXIT)
|
||||
|
||||
@ -355,6 +354,9 @@ class UI(MainPage):
|
||||
if MAP_EXIT.match_template_luma(self.device.image):
|
||||
if self.image_color_count(MAP_EXIT, color=(235, 235, 235), threshold=221, count=50):
|
||||
appear = True
|
||||
if MAP_EXIT_OE.match_template_luma(self.device.image):
|
||||
if self.image_color_count(MAP_EXIT_OE, color=(235, 235, 235), threshold=221, count=50):
|
||||
appear = True
|
||||
|
||||
if appear and interval:
|
||||
self.interval_reset(MAP_EXIT, interval=interval)
|
||||
@ -482,3 +484,6 @@ class UI(MainPage):
|
||||
if self.appear_then_click(ROGUE_LEAVE_FOR_NOW, interval=2):
|
||||
clicked = True
|
||||
continue
|
||||
if self.appear_then_click(ROGUE_LEAVE_FOR_NOW_OE, interval=2):
|
||||
clicked = True
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user