mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-23 00:52:22 +00:00
Add: 增加登录时更新和回归奖励的适配
- 更改了登录时的点击位置
This commit is contained in:
parent
49ddd8d85f
commit
708c972161
Binary file not shown.
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 20 KiB |
BIN
assets/handler/LOGIN_GAME_UPDATE.png
Normal file
BIN
assets/handler/LOGIN_GAME_UPDATE.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
assets/handler/LOGIN_RETURN_SIGN.png
Normal file
BIN
assets/handler/LOGIN_RETURN_SIGN.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
@ -62,7 +62,8 @@ class Screenshot(Connection):
|
||||
self.image = self._screenshot_uiautomator2()
|
||||
|
||||
self.image.load()
|
||||
logger.screenshot_deque.append(self.image)
|
||||
if self.config.ENABLE_ERROR_LOG_AND_SCREENSHOT_SAVE:
|
||||
logger.screenshot_deque.append(self.image)
|
||||
return self.image
|
||||
|
||||
def save_screenshot(self, genre='items'):
|
||||
|
@ -22,7 +22,9 @@ IN_MAP = Button(area=(749, 654, 921, 707), color=(213, 124, 124), button=(749, 6
|
||||
IN_STAGE_BLUE = Button(area=(20, 641, 148, 702), color=(154, 177, 226), button=(20, 641, 148, 702), file='./assets/handler/IN_STAGE_BLUE.png')
|
||||
IN_STAGE_RED = Button(area=(22, 643, 150, 704), color=(229, 159, 159), button=(22, 643, 150, 704), file='./assets/handler/IN_STAGE_RED.png')
|
||||
LOGIN_ANNOUNCE = Button(area=(1160, 45, 1227, 90), color=(174, 61, 56), button=(1160, 45, 1227, 90), file='./assets/handler/LOGIN_ANNOUNCE.png')
|
||||
LOGIN_CHECK = Button(area=(77, 655, 154, 711), color=(33, 36, 33), button=(940, 394, 1107, 513), file='./assets/handler/LOGIN_CHECK.png')
|
||||
LOGIN_CHECK = Button(area=(77, 655, 154, 711), color=(33, 36, 33), button=(416, 294, 534, 400), file='./assets/handler/LOGIN_CHECK.png')
|
||||
LOGIN_GAME_UPDATE = Button(area=(700, 471, 873, 529), color=(238, 170, 78), button=(700, 471, 873, 529), file='./assets/handler/LOGIN_GAME_UPDATE.png')
|
||||
LOGIN_RETURN_SIGN = Button(area=(1, 7, 104, 47), color=(158, 214, 229), button=(1, 7, 104, 47), file='./assets/handler/LOGIN_RETURN_SIGN.png')
|
||||
MAP_AIR_RAID = Button(area=(350, 447, 1280, 472), color=(154, 43, 46), button=(350, 447, 1280, 472), file='./assets/handler/MAP_AIR_RAID.png')
|
||||
MAP_AMBUSH = Button(area=(261, 433, 1280, 449), color=(161, 41, 43), button=(261, 433, 1280, 449), file='./assets/handler/MAP_AMBUSH.png')
|
||||
MAP_AMBUSH_EVADE = Button(area=(325, 393, 1280, 395), color=(255, 255, 255), button=(979, 444, 1152, 502), file='./assets/handler/MAP_AMBUSH_EVADE.png')
|
||||
|
@ -1,7 +1,7 @@
|
||||
from module.combat.combat import Combat
|
||||
from module.logger import logger
|
||||
from module.base.timer import Timer
|
||||
from module.handler.assets import LOGIN_CHECK, LOGIN_ANNOUNCE
|
||||
from module.handler.assets import *
|
||||
from module.ui.ui import MAIN_CHECK, EVENT_LIST_CHECK, BACK_ARROW
|
||||
|
||||
|
||||
@ -22,6 +22,10 @@ class LoginHandler(Combat):
|
||||
if self.appear(EVENT_LIST_CHECK, offset=(30, 30), interval=1):
|
||||
self.device.click(BACK_ARROW)
|
||||
continue
|
||||
if self.appear_then_click(LOGIN_GAME_UPDATE, offset=(30, 30), interval=1):
|
||||
continue
|
||||
if self.appear_then_click(LOGIN_RETURN_SIGN, offset=(30, 30), interval=1):
|
||||
continue
|
||||
|
||||
if self.info_bar_count() and self.appear_then_click(LOGIN_CHECK, interval=0.5):
|
||||
logger.info('Login success')
|
||||
|
Loading…
Reference in New Issue
Block a user