mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2025-12-16 22:05:12 +00:00
Compare commits
5 Commits
84f78230d2
...
0a697e9398
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a697e9398 | |||
| 143f519adb | |||
| af71e797db | |||
| 6ef18ed8c0 | |||
| 8781e7830c |
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.3 KiB |
BIN
assets/jp/base/popup/INSUFFICIENT_INVENTORY.BUTTON.png
Normal file
BIN
assets/jp/base/popup/INSUFFICIENT_INVENTORY.BUTTON.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/jp/base/popup/INSUFFICIENT_INVENTORY.png
Normal file
BIN
assets/jp/base/popup/INSUFFICIENT_INVENTORY.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
@ -499,19 +499,6 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig, ConfigWatcher
|
||||
self.task_call('DailyQuest')
|
||||
self.task_stop()
|
||||
|
||||
def update_battle_pass_quests(self):
|
||||
"""
|
||||
Raises:
|
||||
TaskEnd: Call task `BattlePass` and stop current task
|
||||
"""
|
||||
if self.stored.BattlePassTodayQuest.is_expired():
|
||||
if self.stored.BattlePassLevel.is_full():
|
||||
logger.info('BattlePassLevel full, no updates')
|
||||
else:
|
||||
logger.info('BattlePassTodayQuest expired, call task to update')
|
||||
self.task_call('BattlePass')
|
||||
self.task_stop()
|
||||
|
||||
@property
|
||||
def DEVICE_SCREENSHOT_METHOD(self):
|
||||
return self.Emulator_ScreenshotMethod
|
||||
|
||||
@ -24,10 +24,10 @@ AP_EXCEED = ButtonWrapper(
|
||||
name='AP_EXCEED',
|
||||
jp=Button(
|
||||
file='./assets/jp/base/popup/AP_EXCEED.png',
|
||||
area=(610, 124, 669, 153),
|
||||
search=(590, 104, 689, 173),
|
||||
color=(139, 153, 168),
|
||||
button=(535, 494, 746, 565),
|
||||
area=(611, 147, 669, 177),
|
||||
search=(591, 127, 689, 197),
|
||||
color=(143, 156, 170),
|
||||
button=(539, 470, 743, 533),
|
||||
),
|
||||
en=Button(
|
||||
file='./assets/en/base/popup/AP_EXCEED.png',
|
||||
@ -124,7 +124,13 @@ GET_REWARD_SKIP = ButtonWrapper(
|
||||
)
|
||||
INSUFFICIENT_INVENTORY = ButtonWrapper(
|
||||
name='INSUFFICIENT_INVENTORY',
|
||||
jp=None,
|
||||
jp=Button(
|
||||
file='./assets/jp/base/popup/INSUFFICIENT_INVENTORY.png',
|
||||
area=(610, 124, 669, 153),
|
||||
search=(590, 104, 689, 173),
|
||||
color=(139, 153, 168),
|
||||
button=(535, 494, 746, 565),
|
||||
),
|
||||
en=Button(
|
||||
file='./assets/en/base/popup/INSUFFICIENT_INVENTORY.png',
|
||||
area=(578, 117, 703, 152),
|
||||
|
||||
@ -94,6 +94,12 @@ class PopupHandler(ModuleBase):
|
||||
|
||||
return False
|
||||
|
||||
def handle_insufficient_inventory(self, interval=5) -> bool:
|
||||
if self.appear_then_click(INSUFFICIENT_INVENTORY, interval=interval):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def handle_item_expired(self, interval=5) -> bool:
|
||||
if self.appear_then_click(ITEM_EXPIRED, interval=interval):
|
||||
return True
|
||||
|
||||
@ -345,6 +345,8 @@ class UI(MainPage):
|
||||
return True
|
||||
if self.handle_ap_exceed():
|
||||
return True
|
||||
if self.handle_insufficient_inventory():
|
||||
return True
|
||||
if self.handle_item_expired():
|
||||
return True
|
||||
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
from module.base.timer import Timer
|
||||
from module.base.decorator import Config
|
||||
from module.exception import GameNotRunningError
|
||||
from module.logger import logger
|
||||
from tasks.base.page import page_main
|
||||
from tasks.base.ui import UI
|
||||
from tasks.login.assets.assets_login import LOGIN_CONFIRM, LOGIN_LOADING, UPDATE
|
||||
from tasks.login.assets.assets_login import LOGIN_CONFIRM, LOGIN_LOADING, UPDATE, SURVEY
|
||||
|
||||
|
||||
class Login(UI):
|
||||
@ -29,6 +30,16 @@ class Login(UI):
|
||||
return True
|
||||
return False
|
||||
|
||||
@Config.when(Emulator_GameLanguage='en')
|
||||
def _handle_survey(self):
|
||||
if self.appear_then_click(SURVEY):
|
||||
return True
|
||||
return False
|
||||
|
||||
@Config.when(Emulator_GameLanguage=None)
|
||||
def _handle_survey(self):
|
||||
pass
|
||||
|
||||
logger.hr('App login')
|
||||
orientation_timer = Timer(5)
|
||||
startup_timer = Timer(5).start()
|
||||
@ -78,6 +89,8 @@ class Login(UI):
|
||||
# continue
|
||||
if self.appear_then_click(UPDATE):
|
||||
continue
|
||||
if _handle_survey(self):
|
||||
continue
|
||||
if self.ui_additional():
|
||||
continue
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user