mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-27 02:27:12 +00:00
Fix: [CN] LOGIN_CONFIRM different in different device
- Improve log appearance of login
This commit is contained in:
parent
d0867262e2
commit
51f39be0ff
Binary file not shown.
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 5.4 KiB |
@ -22,7 +22,7 @@ IN_MAP = Button(area={'cn': (749, 654, 921, 707), 'en': (748, 652, 922, 702), 'j
|
||||
IN_STAGE = Button(area={'cn': (122, 16, 172, 39), 'en': (120, 18, 208, 40), 'jp': (121, 15, 174, 40)}, color={'cn': (149, 167, 207), 'en': (104, 118, 157), 'jp': (151, 167, 205)}, button={'cn': (122, 16, 172, 39), 'en': (120, 18, 208, 40), 'jp': (121, 15, 174, 40)}, file={'cn': './assets/cn/handler/IN_STAGE.png', 'en': './assets/en/handler/IN_STAGE.png', 'jp': './assets/jp/handler/IN_STAGE.png'})
|
||||
LOGIN_ANNOUNCE = Button(area={'cn': (1160, 45, 1227, 90), 'en': (1159, 44, 1228, 91), 'jp': (1160, 46, 1224, 86)}, color={'cn': (174, 61, 56), 'en': (193, 79, 73), 'jp': (191, 79, 74)}, button={'cn': (1160, 45, 1227, 90), 'en': (1159, 44, 1228, 91), 'jp': (1160, 46, 1224, 86)}, file={'cn': './assets/cn/handler/LOGIN_ANNOUNCE.png', 'en': './assets/en/handler/LOGIN_ANNOUNCE.png', 'jp': './assets/jp/handler/LOGIN_ANNOUNCE.png'})
|
||||
LOGIN_CHECK = Button(area={'cn': (77, 655, 154, 711), 'en': (77, 655, 154, 711), 'jp': (77, 655, 154, 711)}, color={'cn': (33, 36, 33), 'en': (33, 36, 33), 'jp': (33, 36, 33)}, button={'cn': (416, 294, 534, 400), 'en': (416, 294, 534, 400), 'jp': (416, 294, 534, 400)}, file={'cn': './assets/cn/handler/LOGIN_CHECK.png', 'en': './assets/en/handler/LOGIN_CHECK.png', 'jp': './assets/jp/handler/LOGIN_CHECK.png'})
|
||||
LOGIN_CONFIRM = Button(area={'cn': (464, 372, 814, 426), 'en': (464, 372, 814, 426), 'jp': (464, 372, 814, 426)}, color={'cn': (39, 174, 229), 'en': (39, 174, 229), 'jp': (39, 174, 229)}, button={'cn': (464, 372, 814, 426), 'en': (464, 372, 814, 426), 'jp': (464, 372, 814, 426)}, file={'cn': './assets/cn/handler/LOGIN_CONFIRM.png', 'en': './assets/en/handler/LOGIN_CONFIRM.png', 'jp': './assets/jp/handler/LOGIN_CONFIRM.png'})
|
||||
LOGIN_CONFIRM = Button(area={'cn': (678, 384, 807, 426), 'en': (678, 384, 807, 426), 'jp': (678, 384, 807, 426)}, color={'cn': (35, 173, 229), 'en': (35, 173, 229), 'jp': (35, 173, 229)}, button={'cn': (678, 384, 807, 426), 'en': (678, 384, 807, 426), 'jp': (678, 384, 807, 426)}, file={'cn': './assets/cn/handler/LOGIN_CONFIRM.png', 'en': './assets/en/handler/LOGIN_CONFIRM.png', 'jp': './assets/jp/handler/LOGIN_CONFIRM.png'})
|
||||
LOGIN_GAME_UPDATE = Button(area={'cn': (700, 471, 873, 529), 'en': (699, 470, 874, 530), 'jp': (700, 471, 873, 529)}, color={'cn': (238, 170, 78), 'en': (236, 167, 74), 'jp': (238, 170, 78)}, button={'cn': (700, 471, 873, 529), 'en': (699, 470, 874, 530), 'jp': (700, 471, 873, 529)}, file={'cn': './assets/cn/handler/LOGIN_GAME_UPDATE.png', 'en': './assets/en/handler/LOGIN_GAME_UPDATE.png', 'jp': './assets/jp/handler/LOGIN_GAME_UPDATE.png'})
|
||||
LOGIN_RETURN_SIGN = Button(area={'cn': (1, 7, 104, 47), 'en': (1195, 524, 1272, 547), 'jp': (1, 7, 104, 47)}, color={'cn': (158, 214, 229), 'en': (202, 202, 203), 'jp': (158, 214, 229)}, button={'cn': (1, 7, 104, 47), 'en': (1195, 524, 1272, 547), 'jp': (1, 7, 104, 47)}, file={'cn': './assets/cn/handler/LOGIN_RETURN_SIGN.png', 'en': './assets/en/handler/LOGIN_RETURN_SIGN.png', 'jp': './assets/jp/handler/LOGIN_RETURN_SIGN.png'})
|
||||
MAP_AIR_RAID = Button(area={'cn': (350, 447, 1280, 472), 'en': (350, 447, 1280, 472), 'jp': (350, 447, 1280, 472)}, color={'cn': (154, 43, 46), 'en': (154, 43, 46), 'jp': (154, 43, 46)}, button={'cn': (350, 447, 1280, 472), 'en': (350, 447, 1280, 472), 'jp': (350, 447, 1280, 472)}, file={'cn': './assets/cn/handler/MAP_AIR_RAID.png', 'en': './assets/en/handler/MAP_AIR_RAID.png', 'jp': './assets/jp/handler/MAP_AIR_RAID.png'})
|
||||
|
@ -12,6 +12,7 @@ class LoginHandler(Combat):
|
||||
logger.hr('App login')
|
||||
|
||||
confirm_timer = Timer(1.5, count=4).start()
|
||||
login_success = False
|
||||
while 1:
|
||||
self.device.screenshot()
|
||||
|
||||
@ -28,11 +29,13 @@ class LoginHandler(Combat):
|
||||
continue
|
||||
if self.appear_then_click(LOGIN_RETURN_SIGN, offset=(30, 30), interval=1):
|
||||
continue
|
||||
if self.appear_then_click(LOGIN_CONFIRM, offset=(30, 30), interval=1):
|
||||
if self.appear_then_click(LOGIN_CONFIRM, interval=1):
|
||||
continue
|
||||
|
||||
if self.info_bar_count() and self.appear_then_click(LOGIN_CHECK, interval=0.5):
|
||||
logger.info('Login success')
|
||||
if self.info_bar_count() and self.appear_then_click(LOGIN_CHECK, interval=5):
|
||||
if not login_success:
|
||||
logger.info('Login success')
|
||||
login_success = True
|
||||
if self.appear(MAIN_CHECK):
|
||||
if confirm_timer.reached():
|
||||
logger.info('Login to main confirm')
|
||||
|
Loading…
Reference in New Issue
Block a user