2023-04-10 18:58:19 +02:00
|
|
|
from typing import Dict
|
|
|
|
|
|
|
|
from core.config import CoreConfig
|
2023-07-15 22:51:54 +02:00
|
|
|
from titles.mai2.universeplus import Mai2UniversePlus
|
2023-04-10 18:58:19 +02:00
|
|
|
from titles.mai2.const import Mai2Constants
|
|
|
|
from titles.mai2.config import Mai2Config
|
|
|
|
|
|
|
|
|
2023-07-15 22:51:54 +02:00
|
|
|
class Mai2Festival(Mai2UniversePlus):
|
2023-04-10 18:58:19 +02:00
|
|
|
def __init__(self, cfg: CoreConfig, game_cfg: Mai2Config) -> None:
|
|
|
|
super().__init__(cfg, game_cfg)
|
|
|
|
self.version = Mai2Constants.VER_MAIMAI_DX_FESTIVAL
|
|
|
|
|
2024-01-09 09:07:04 +01:00
|
|
|
async def handle_cm_get_user_preview_api_request(self, data: Dict) -> Dict:
|
|
|
|
user_data = await super().handle_cm_get_user_preview_api_request(data)
|
2023-04-10 18:58:19 +02:00
|
|
|
|
2023-10-15 19:04:15 +02:00
|
|
|
# hardcode lastDataVersion for CardMaker
|
2023-04-10 18:58:19 +02:00
|
|
|
user_data["lastDataVersion"] = "1.30.00"
|
|
|
|
return user_data
|
|
|
|
|
2024-01-09 09:07:04 +01:00
|
|
|
async def handle_user_login_api_request(self, data: Dict) -> Dict:
|
|
|
|
user_login = await super().handle_user_login_api_request(data)
|
2023-04-10 18:58:19 +02:00
|
|
|
# useless?
|
|
|
|
user_login["Bearer"] = "ARTEMiSTOKEN"
|
|
|
|
return user_login
|
|
|
|
|
2024-01-09 09:07:04 +01:00
|
|
|
async def handle_get_user_recommend_rate_music_api_request(self, data: Dict) -> Dict:
|
2023-10-15 19:04:15 +02:00
|
|
|
"""
|
|
|
|
userRecommendRateMusicIdList: list[int]
|
|
|
|
"""
|
2023-04-10 18:58:19 +02:00
|
|
|
return {"userId": data["userId"], "userRecommendRateMusicIdList": []}
|
|
|
|
|
2024-01-09 09:07:04 +01:00
|
|
|
async def handle_get_user_recommend_select_music_api_request(self, data: Dict) -> Dict:
|
2023-10-15 19:04:15 +02:00
|
|
|
"""
|
|
|
|
userRecommendSelectionMusicIdList: list[int]
|
|
|
|
"""
|
2023-04-10 18:58:19 +02:00
|
|
|
return {"userId": data["userId"], "userRecommendSelectionMusicIdList": []}
|