-
Notifications
You must be signed in to change notification settings - Fork 156
/
src.py
86 lines (66 loc) · 2.96 KB
/
src.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
from module.alas import AzurLaneAutoScript
from module.logger import logger
class StarRailCopilot(AzurLaneAutoScript):
def restart(self):
from tasks.login.login import Login
Login(self.config, device=self.device).app_restart()
def start(self):
from tasks.login.login import Login
Login(self.config, device=self.device).app_start()
def stop(self):
from tasks.login.login import Login
Login(self.config, device=self.device).app_stop()
def goto_main(self):
from tasks.login.login import Login
from tasks.base.ui import UI
if self.device.app_is_running():
logger.info('App is already running, goto main page')
UI(self.config, device=self.device).ui_goto_main()
else:
logger.info('App is not running, start app and goto main page')
Login(self.config, device=self.device).app_start()
UI(self.config, device=self.device).ui_goto_main()
def error_postprocess(self):
# Exit cloud game to reduce extra fee
if self.config.is_cloud_game:
from tasks.login.login import Login
Login(self.config, device=self.device).app_stop()
def dungeon(self):
from tasks.dungeon.dungeon import Dungeon
Dungeon(config=self.config, device=self.device).run()
def weekly(self):
from tasks.dungeon.weekly import WeeklyDungeon
WeeklyDungeon(config=self.config, device=self.device).run()
def daily_quest(self):
from tasks.daily.daily_quest import DailyQuestUI
DailyQuestUI(config=self.config, device=self.device).run()
def battle_pass(self):
from tasks.battle_pass.battle_pass import BattlePassUI
BattlePassUI(config=self.config, device=self.device).run()
def assignment(self):
from tasks.assignment.assignment import Assignment
Assignment(config=self.config, device=self.device).run()
def data_update(self):
from tasks.item.data_update import DataUpdate
DataUpdate(config=self.config, device=self.device).run()
def freebies(self):
from tasks.freebies.freebies import Freebies
Freebies(config=self.config, device=self.device).run()
def rogue(self):
from tasks.rogue.rogue import Rogue
Rogue(config=self.config, device=self.device).run()
def ornament(self):
from tasks.ornament.ornament import Ornament
Ornament(config=self.config, device=self.device).run()
def benchmark(self):
from module.daemon.benchmark import run_benchmark
run_benchmark(config=self.config)
def daemon(self):
from tasks.base.daemon import Daemon
Daemon(config=self.config, device=self.device, task="Daemon").run()
def planner_scan(self):
from tasks.planner.scan import PlannerScan
PlannerScan(config=self.config, device=self.device, task="PlannerScan").run()
if __name__ == '__main__':
src = StarRailCopilot('src')
src.loop()