[Enhance] Save unlock? & songlist parser?

- Support more things in full cloud save unlocking and songlist parser
- For Arcaea 5.0.1

> NOTE: May not work well because this client version is not completed and confusing!!
This commit is contained in:
Lost-MSth
2023-09-28 21:48:54 +08:00
parent 5788972692
commit 1f389e4073
7 changed files with 65 additions and 24 deletions

View File

@@ -12,7 +12,7 @@ class Config:
SONG_FILE_HASH_PRE_CALCULATE = True
GAME_API_PREFIX = '/pollen/22'
GAME_API_PREFIX = '/evolution/23'
ALLOW_APPVERSION = [] # list[str]

View File

@@ -1,6 +1,6 @@
from .config_manager import Config
ARCAEA_SERVER_VERSION = 'v2.11.2.4'
ARCAEA_SERVER_VERSION = 'v2.11.2.6'
ARCAEA_LOG_DATBASE_VERSION = 'v1.1'

View File

@@ -83,6 +83,7 @@ class SonglistParser:
def parse_one(self, song: dict) -> dict:
'''解析单个歌曲'''
# TODO: byd_local_unlock ???
if not 'id' in song:
return {}
r = 0
@@ -96,11 +97,12 @@ class SonglistParser:
if any(i['ratingClass'] == 3 for i in song.get('difficulties', [])):
r |= 8
if 'additional_files' in song:
if 'video.mp4' in song['additional_files']:
for extra_file in song.get('additional_files', []):
if extra_file['file_name'] == SonglistParser.FILE_NAMES[6]:
r |= 64
if 'video_audio.ogg' in song['additional_files']:
elif extra_file['file_name'] == SonglistParser.FILE_NAMES[7]:
r |= 128
return {song['id']: r}
def parse_one_unlock(self, song: dict) -> None:

View File

@@ -96,13 +96,16 @@ class SaveData:
i['c'] = True
i['r'] = True
for i in self.unlocklist_data:
if i['unlock_key'][-3:] == '101':
x = i['unlock_key']
if x[-3:] == '101':
i['complete'] = 100
elif i['unlock_key'][:16] == 'aegleseeker|2|3|':
elif x[:16] == 'aegleseeker|2|3|':
i['complete'] = 10
elif i['unlock_key'] == 'saikyostronger|2|3|einherjar|2':
elif x == 'saikyostronger|2|3|einherjar|2':
i['complete'] = 6
elif i['unlock_key'] == 'saikyostronger|2|3|laqryma|2':
elif x == 'saikyostronger|2|3|laqryma|2':
i['complete'] = 3
elif x[-5:-2] == '109':
i['complete'] = 3
else:
i['complete'] = 1