chuni: add stage import and frontend config

This commit is contained in:
Dniel97
2026-01-01 20:40:27 +01:00
parent 2cbf34dc28
commit 8408d30dc5
9 changed files with 219 additions and 19 deletions

View File

@@ -477,6 +477,17 @@ class ChuniProfileData(BaseData):
return False
return True
async def update_stage(self, user_id: int, version: int, new_stage: int) -> bool:
sql = profile.update((profile.c.user == user_id) & (profile.c.version == version)).values(
stageId=new_stage
)
result = await self.execute(sql)
if result is None:
self.logger.warning(f"Failed to set user {user_id} stage")
return False
return True
async def update_userbox(self, user_id: int, version: int, new_nameplate: int, new_trophy: int, new_trophy_sub_1: int, new_trophy_sub_2: int, new_character: int) -> bool:
sql = profile.update((profile.c.user == user_id) & (profile.c.version == version)).values(
nameplateId=new_nameplate,