mirror of
https://github.com/sui-feng-cb/AzurLaneAutoScript1.git
synced 2026-06-23 21:47:36 +08:00
Merge branch 'master' of https://github.com/LmeSzinc/AzurLaneAutoScript
This commit is contained in:
@@ -60,6 +60,7 @@ class CampaignBase(CampaignBase_):
|
||||
increase as more war archives campaigns are added
|
||||
"""
|
||||
confirm_timer = Timer(1.5, count=4)
|
||||
loading_checked = False
|
||||
for _ in range(20):
|
||||
if skip_first_screenshot:
|
||||
skip_first_screenshot = False
|
||||
@@ -73,14 +74,25 @@ class CampaignBase(CampaignBase_):
|
||||
# before starting next search attempt
|
||||
while not self.appear(WAR_ARCHIVES_CHECK):
|
||||
self.ui_ensure(destination=page_archives)
|
||||
loading_checked = False
|
||||
|
||||
while not self._archives_loading_complete():
|
||||
self.device.screenshot()
|
||||
|
||||
# check entrance first, because game can remember last scrolling position
|
||||
# if you stays at page_campaign_menu
|
||||
# and bypass _archives_loading_complete if reached entrance
|
||||
entrance = self._get_archives_entrance(name)
|
||||
if entrance is not None:
|
||||
return entrance
|
||||
|
||||
if not loading_checked:
|
||||
# _archives_loading_complete might take 1~2s if archive list is not at top
|
||||
while not self._archives_loading_complete():
|
||||
self.device.screenshot()
|
||||
loading_checked = True
|
||||
|
||||
entrance = self._get_archives_entrance(name)
|
||||
if entrance is not None:
|
||||
return entrance
|
||||
|
||||
if WAR_ARCHIVES_SCROLL.appear(main=self):
|
||||
confirm_timer.clear()
|
||||
if WAR_ARCHIVES_SCROLL.at_bottom(main=self):
|
||||
|
||||
Reference in New Issue
Block a user