[Enhance] Missions & ETR

- Add support for missions
- PTT mechanism: Change first play protection to new best protection
- Adapt to the new difficulty ETR
- Uncap DORO*C
- Incomplete support for "pick_ticket"
- Fix requirements: cryptography >= 35.0.0

Note: This is an intermediate test version, only for Arcaea 5.4.0c. Next version will adapt to 5.4.0.
This commit is contained in:
Lost-MSth
2024-03-10 11:26:21 +08:00
parent e206247c09
commit d65cc3bcbe
24 changed files with 554 additions and 63 deletions

View File

@@ -13,7 +13,7 @@ from core.user import UserOnline
from .auth import auth_required
from .func import arc_try, error_return, success_return
from .present import present_info
from .purchase import bundle_bundle, bundle_pack
from .purchase import bundle_bundle, get_single, bundle_pack
from .score import song_score_friend
from .user import user_me
from .world import world_all
@@ -26,6 +26,28 @@ def game_info():
return success_return(GameInfo().to_dict())
# @bp.route('/game/content_bundle', methods=['GET']) # 热更新
# def game_content_bundle():
# app_version = request.headers.get('AppVersion')
# bundle_version = request.headers.get('ContentBundle')
# import os
# if bundle_version != '5.4.0':
# r = {'orderedResults': [
# {
# 'appVersion': '5.4.0',
# 'contentBundleVersion': '5.4.0',
# 'jsonUrl': 'http://192.168.0.110/bundle_download/bundle.json',
# 'jsonSize': os.path.getsize('./database/bundle/bundle.json'),
# 'bundleUrl': 'http://192.168.0.110/bundle_download/bundle',
# 'bundleSize': os.path.getsize('./database/bundle/bundle')
# },
# ]
# }
# else:
# r = {}
# return success_return(r)
@bp.route('/serve/download/me/song', methods=['GET']) # 歌曲下载
@auth_required(request)
@arc_try
@@ -66,15 +88,18 @@ def applog_me():
return success_return({})
map_dict = {'/user/me': user_me,
'/purchase/bundle/pack': bundle_pack,
'/serve/download/me/song': download_song,
'/game/info': game_info,
'/present/me': present_info,
'/world/map/me': world_all,
'/score/song/friend': song_score_friend,
'/purchase/bundle/bundle': bundle_bundle,
'/finale/progress': finale_progress}
map_dict = {
'/user/me': user_me,
'/purchase/bundle/pack': bundle_pack,
'/serve/download/me/song': download_song,
'/game/info': game_info,
'/present/me': present_info,
'/world/map/me': world_all,
'/score/song/friend': song_score_friend,
'/purchase/bundle/bundle': bundle_bundle,
'/finale/progress': finale_progress,
'/purchase/bundle/single': get_single
}
@bp.route('/compose/aggregate', methods=['GET']) # 集成式请求