Compare commits
185 Commits
island
...
logger_unl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
678aba2807 | ||
|
|
eb33bdd747 | ||
|
|
bb349af001 | ||
|
|
87a031ed97 | ||
|
|
52444569a4 | ||
|
|
f23d4fb681 | ||
|
|
912c74b8e1 | ||
|
|
f552360951 | ||
|
|
6d47f626d1 | ||
|
|
0b8d1a5b57 | ||
|
|
e01b77c6e5 | ||
|
|
afbdd261e6 | ||
|
|
f314caa862 | ||
|
|
43d3fa122c | ||
|
|
36e998aed7 | ||
|
|
b65a951ce4 | ||
|
|
c37a52bf9c | ||
|
|
bf4e06e565 | ||
|
|
130edcde83 | ||
|
|
475c2dd2bc | ||
|
|
8ea89756f1 | ||
|
|
75af8e39be | ||
|
|
d1aed19f8f | ||
|
|
12df3efeba | ||
|
|
ad651eca4c | ||
|
|
37197f03bb | ||
|
|
6bd4a4ffed | ||
|
|
cc82d01353 | ||
|
|
6ae47a39e4 | ||
|
|
2bf6b7227e | ||
|
|
ee6053a047 | ||
|
|
99de5e0d34 | ||
|
|
8ce61ac290 | ||
|
|
72b6222a2f | ||
|
|
14c70afe65 | ||
|
|
83f167ccc1 | ||
|
|
dd90b6e36b | ||
|
|
bcfe9b260e | ||
|
|
a9716922f0 | ||
|
|
e51aed9ed6 | ||
|
|
3fb7c54908 | ||
|
|
63a2d7388f | ||
|
|
eb30860260 | ||
|
|
c9478cb542 | ||
|
|
c36586f8c5 | ||
|
|
4a21f2e4e7 | ||
|
|
7e42f0ea6c | ||
|
|
4012541412 | ||
|
|
90e438e75e | ||
|
|
f3509c0de4 | ||
|
|
8d9e54b4de | ||
|
|
2dca300d2c | ||
|
|
c376d36c24 | ||
|
|
c02c11d725 | ||
|
|
9261630f77 | ||
|
|
7ab1865ebe | ||
|
|
32d36cd06d | ||
|
|
fbb936f081 | ||
|
|
b4ba9e5fd0 | ||
|
|
1b3d690176 | ||
|
|
1297908d89 | ||
|
|
f52789fbad | ||
|
|
fda137f62b | ||
|
|
5bde6242f9 | ||
|
|
21c92d95e3 | ||
|
|
b9ed5b134e | ||
|
|
b7301482c7 | ||
|
|
265e33b93c | ||
|
|
ed154c1920 | ||
|
|
d11dce42cc | ||
|
|
fa55a850fe | ||
|
|
83f103daa2 | ||
|
|
7503cf2111 | ||
|
|
98c513baff | ||
|
|
45183a10d5 | ||
|
|
ead86cdfc2 | ||
|
|
369a12abfb | ||
|
|
ae9d64c81f | ||
|
|
be012c843d | ||
|
|
5b5c549d30 | ||
|
|
ba594e769a | ||
|
|
58ddb01976 | ||
|
|
a07c99fe85 | ||
|
|
c04f9ce964 | ||
|
|
3f9b5be0bf | ||
|
|
eac6ed2cf0 | ||
|
|
261440be65 | ||
|
|
5c8fe18a57 | ||
|
|
a36d36c0d9 | ||
|
|
9563e149dc | ||
|
|
19e580b78e | ||
|
|
51934ff3f6 | ||
|
|
a680c07706 | ||
|
|
df6bc4b69c | ||
|
|
1a29d642a0 | ||
|
|
00f8d6d2b0 | ||
|
|
c235247eb4 | ||
|
|
b44e62f973 | ||
|
|
02b459c6af | ||
|
|
550f17300f | ||
|
|
b14ab02c97 | ||
|
|
d90390202b | ||
|
|
cd18378ad4 | ||
|
|
cfe9ec5618 | ||
|
|
ed1a430869 | ||
|
|
106a22143e | ||
|
|
928ff5f0a9 | ||
|
|
8d75bfa848 | ||
|
|
feecbc2c15 | ||
|
|
8b8f5e4ec8 | ||
|
|
40434b686b | ||
|
|
b9721d64ed | ||
|
|
a64f1e9157 | ||
|
|
5f83ea097f | ||
|
|
2148f7d53a | ||
|
|
d6f24187ae | ||
|
|
a85f2c781c | ||
|
|
8238353ace | ||
|
|
eeb7c469a1 | ||
|
|
8beab16cef | ||
|
|
3bf5ca91c0 | ||
|
|
b56ab2d555 | ||
|
|
193a798d6b | ||
|
|
767f13ae62 | ||
|
|
ebe5ca794b | ||
|
|
8d040e9345 | ||
|
|
6abe794e37 | ||
|
|
2cd83c683d | ||
|
|
5d18e7cd1f | ||
|
|
b315e53311 | ||
|
|
fc7f5a1882 | ||
|
|
01b3dc2369 | ||
|
|
d12bd1598e | ||
|
|
8eb8889f15 | ||
|
|
d4142afa22 | ||
|
|
353eb27868 | ||
|
|
c1a11bed56 | ||
|
|
40442df9ff | ||
|
|
fc966a45be | ||
|
|
7b9edcaf37 | ||
|
|
84cb4c6b5a | ||
|
|
ae9224f79e | ||
|
|
9e859c5fc5 | ||
|
|
c6957dcee2 | ||
|
|
553acf2417 | ||
|
|
bd4852a356 | ||
|
|
cac507229f | ||
|
|
1ea5370c3b | ||
|
|
f9c25961bb | ||
|
|
bb1242402e | ||
|
|
f31da700a0 | ||
|
|
c9fdefdf90 | ||
|
|
61b0745750 | ||
|
|
c06773e586 | ||
|
|
d91abd8470 | ||
|
|
d89094b396 | ||
|
|
dc41d544b3 | ||
|
|
bbfc049bdb | ||
|
|
2359b2fd82 | ||
|
|
1805a6d8ee | ||
|
|
59e5a39d64 | ||
|
|
c99b104f8f | ||
|
|
06a8ec167e | ||
|
|
d0159db710 | ||
|
|
8814413bfe | ||
|
|
20f4f64708 | ||
|
|
7dd3479e66 | ||
|
|
80fe33d9c4 | ||
|
|
40876858ae | ||
|
|
c0f6c52597 | ||
|
|
4347616d55 | ||
|
|
a61e93942d | ||
|
|
04cea16725 | ||
|
|
a1282a03fa | ||
|
|
2267203305 | ||
|
|
470babfe80 | ||
|
|
5df0383395 | ||
|
|
a1b9fffb16 | ||
|
|
f5b92dae34 | ||
|
|
073464a298 | ||
|
|
e1b5ff7ba2 | ||
|
|
21c83983d6 | ||
|
|
f9eff1fe2d | ||
|
|
ec4f8d0d4f | ||
|
|
31fa8ae3a5 |
8
.github/pull.yml
vendored
@@ -1,8 +0,0 @@
|
||||
version: "1"
|
||||
rules:
|
||||
- base: master
|
||||
upstream: LmeSzinc:master
|
||||
mergeMethod: merge
|
||||
mergeUnstable: true
|
||||
label: ":arrow_heading_down: pull"
|
||||
conflictLabel: "merge-conflict": true
|
||||
34
.github/workflows/main.yml
vendored
@@ -1,34 +0,0 @@
|
||||
name: Upstream Sync
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 * * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync_with_upstream:
|
||||
name: Sync with Upstream
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.repository.fork }}
|
||||
|
||||
steps:
|
||||
- name: Checkout target repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Sync Upstream
|
||||
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4
|
||||
with:
|
||||
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
upstream_sync_repo: LmeSzinc/AzurLaneAutoScript
|
||||
upstream_sync_branch: master
|
||||
target_sync_branch: master
|
||||
test_mode: false
|
||||
|
||||
- name: Check for Failure
|
||||
if: failure()
|
||||
run: |
|
||||
echo "[Error] Due to a change in the workflow file of the upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork."
|
||||
exit 1
|
||||
@@ -177,3 +177,4 @@ Alas 仍在活跃开发中,我们会不定期发布未来的工作在 [Issues]
|
||||
- QQ 八群:[938081688](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=3h8Gl323WkIt6yGx8Jx5Ht93puZxeA8T&authKey=xPT6kPm7W9jWO2TNzPdohJ27l1njxorwKmkDrbwwYGGA6Oni1xQSJhHsRIJ8w7GZ&noverify=0&group_code=938081688)
|
||||
- QQ 一群:[1087735381](https://jq.qq.com/?_wv=1027&k=I4NSqX7g) (有开发意向请加一群,入群需要提供你的Github用户名)
|
||||
- Bilibili 直播间:https://live.bilibili.com/22216705 ,偶尔直播写Alas,~~为了拯救Alas,Lme决定出道成为偶像~~
|
||||
|
||||
|
||||
49
alas.py
@@ -14,8 +14,6 @@ from module.exception import *
|
||||
from module.logger import logger
|
||||
from module.notify import handle_notify
|
||||
|
||||
RESTART_SENSITIVE_TASKS = ['OpsiObscure', 'OpsiAbyssal', 'OpsiCrossMonth']
|
||||
|
||||
|
||||
class AzurLaneAutoScript:
|
||||
stop_event: threading.Event = None
|
||||
@@ -50,9 +48,6 @@ class AzurLaneAutoScript:
|
||||
except RequestHumanTakeover:
|
||||
logger.critical('Request human takeover')
|
||||
exit(1)
|
||||
except EmulatorNotRunningError:
|
||||
logger.critical('EmulatorNotRunningError')
|
||||
exit(1)
|
||||
except Exception as e:
|
||||
logger.exception(e)
|
||||
exit(1)
|
||||
@@ -101,10 +96,12 @@ class AzurLaneAutoScript:
|
||||
if self.checker.is_available():
|
||||
logger.critical('Game page unknown')
|
||||
self.save_error_log()
|
||||
logger.warning('Restart to reset Game page in 10 seconds')
|
||||
self.config.task_call('Restart')
|
||||
self.device.sleep(10)
|
||||
return False
|
||||
handle_notify(
|
||||
self.config.Error_OnePushConfig,
|
||||
title=f"Alas <{self.config_name}> crashed",
|
||||
content=f"<{self.config_name}> GamePageUnknownError",
|
||||
)
|
||||
exit(1)
|
||||
else:
|
||||
self.checker.wait_until_available()
|
||||
return False
|
||||
@@ -125,10 +122,6 @@ class AzurLaneAutoScript:
|
||||
content=f"<{self.config_name}> RequestHumanTakeover",
|
||||
)
|
||||
exit(1)
|
||||
except AutoSearchSetError:
|
||||
logger.critical('Auto search could not be set correctly. Maybe your ships in hard mode are changed.')
|
||||
logger.critical('Request human takeover.')
|
||||
exit(1)
|
||||
except Exception as e:
|
||||
logger.exception(e)
|
||||
self.save_error_log()
|
||||
@@ -248,10 +241,6 @@ class AzurLaneAutoScript:
|
||||
from module.private_quarters.private_quarters import PrivateQuarters
|
||||
PrivateQuarters(config=self.config, device=self.device).run()
|
||||
|
||||
def island(self):
|
||||
from module.island.island import Island
|
||||
Island(config=self.config, device=self.device).run()
|
||||
|
||||
def daily(self):
|
||||
from module.daily.daily import Daily
|
||||
Daily(config=self.config, device=self.device).run()
|
||||
@@ -390,10 +379,6 @@ class AzurLaneAutoScript:
|
||||
from module.event_hospital.hospital import Hospital
|
||||
Hospital(config=self.config, device=self.device).run()
|
||||
|
||||
def hospital_event(self):
|
||||
from module.event_hospital.hospital_event import HospitalEvent
|
||||
HospitalEvent(config=self.config, device=self.device).run()
|
||||
|
||||
def coalition(self):
|
||||
from module.coalition.coalition import Coalition
|
||||
Coalition(config=self.config, device=self.device).run()
|
||||
@@ -434,10 +419,6 @@ class AzurLaneAutoScript:
|
||||
from module.eventstory.eventstory import EventStory
|
||||
EventStory(config=self.config, device=self.device, task="EventStory").run()
|
||||
|
||||
def box_disassemble(self):
|
||||
from module.storage.box_disassemble import StorageBox
|
||||
StorageBox(config=self.config, device=self.device, task="BoxDisassemble").run()
|
||||
|
||||
def azur_lane_uncensored(self):
|
||||
from module.daemon.uncensored import AzurLaneUncensored
|
||||
AzurLaneUncensored(config=self.config, device=self.device, task="AzurLaneUncensored").run()
|
||||
@@ -560,12 +541,8 @@ class AzurLaneAutoScript:
|
||||
_ = self.device
|
||||
self.device.config = self.config
|
||||
# Skip first restart
|
||||
if task == 'Restart':
|
||||
if self.is_first_task:
|
||||
logger.info('Skip task `Restart` at scheduler start')
|
||||
else:
|
||||
from module.handler.login import LoginHandler
|
||||
LoginHandler(self.config, self.device).app_restart()
|
||||
if self.is_first_task and task == 'Restart':
|
||||
logger.info('Skip task `Restart` at scheduler start')
|
||||
self.config.task_delay(server_update=True)
|
||||
del_cached_property(self, 'config')
|
||||
continue
|
||||
@@ -583,21 +560,17 @@ class AzurLaneAutoScript:
|
||||
failed = deep_get(self.failure_record, keys=task, default=0)
|
||||
failed = 0 if success else failed + 1
|
||||
deep_set(self.failure_record, keys=task, value=failed)
|
||||
if failed >= 3 or (self.config.Error_StrictRestart and failed >= 1 and task in RESTART_SENSITIVE_TASKS):
|
||||
logger.critical(f"Task `{task}` failed {failed} or more times.")
|
||||
if failed >= 3:
|
||||
logger.critical(f"Task `{task}` failed 3 or more times.")
|
||||
logger.critical("Possible reason #1: You haven't used it correctly. "
|
||||
"Please read the help text of the options.")
|
||||
logger.critical("Possible reason #2: There is a problem with this task. "
|
||||
"Please contact developers or try to fix it yourself.")
|
||||
if self.config.Error_StrictRestart and task in RESTART_SENSITIVE_TASKS:
|
||||
logger.critical("Possible reason #3: This is a restart sensitive task. "
|
||||
"Please take over the game manually or turn off 'StrictRestart' option.")
|
||||
logger.critical('Request human takeover')
|
||||
|
||||
handle_notify(
|
||||
self.config.Error_OnePushConfig,
|
||||
title=f"Alas <{self.config_name}> crashed",
|
||||
content=f"<{self.config_name}> RequestHumanTakeover\nTask `{task}` failed {failed} or more times.",
|
||||
content=f"<{self.config_name}> RequestHumanTakeover\nTask `{task}` failed 3 or more times.",
|
||||
)
|
||||
exit(1)
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 6.9 KiB |
BIN
assets/cn/coalition/DAL_AREA2.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
assets/cn/coalition/DAL_AREA3.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
assets/cn/coalition/DAL_AREA4.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
assets/cn/coalition/DAL_AREA5.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
assets/cn/coalition/DAL_AREA6.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 9.4 KiB |
BIN
assets/cn/coalition/DAL_FLEET_PREPARATION.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
assets/cn/coalition/DAL_HARD.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
assets/cn/coalition/DAL_NORMAL.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
assets/cn/coalition/DAL_PT_OCR.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/cn/coalition/DAL_SWITCH_MULTI.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
assets/cn/coalition/DAL_SWITCH_SINGLE.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
assets/cn/coalition/FASHION_COALITION_CHECK.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
assets/cn/coalition/FASHION_EASY.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
assets/cn/coalition/FASHION_EX.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
assets/cn/coalition/FASHION_HARD.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/cn/coalition/FASHION_MODE_BATTLE.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
assets/cn/coalition/FASHION_MODE_STORY.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
assets/cn/coalition/FASHION_NORMAL.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
assets/cn/coalition/FASHION_PT_OCR.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
assets/cn/coalition/FASHION_SP.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
assets/cn/coalition/FASHION_SWITCH_MULTI.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
assets/cn/coalition/FASHION_SWITCH_SINGLE.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 8.9 KiB |
BIN
assets/cn/combat/QUIT_RECONFIRM.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.1 KiB |
BIN
assets/cn/combat_ui/QUIT_MaidCafe.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |