chuni: add userbox sub trophy, fix unlock challenge

This commit is contained in:
Dniel97
2025-08-31 19:49:06 +02:00
parent 3c7ac3ac58
commit 415bbc92b3
6 changed files with 73 additions and 19 deletions

View File

@@ -29,11 +29,9 @@ class ChuniVerse(ChuniLuminousPlus):
for unlock_challenge in unlock_challenges:
course_ids = [
unlock_challenge["courseId1"],
unlock_challenge["courseId2"],
unlock_challenge["courseId3"],
unlock_challenge["courseId4"],
unlock_challenge["courseId5"],
unlock_challenge[f"courseId{i}"]
for i in range(1, 6)
if unlock_challenge[f"courseId{i}"] is not None
]
start_date = unlock_challenge["startDate"].replace(
@@ -60,7 +58,7 @@ class ChuniVerse(ChuniLuminousPlus):
"length": len(game_course_level_list),
"gameCourseLevelList": game_course_level_list,
}
async def handle_get_game_u_c_condition_api_request(self, data: Dict) -> Dict:
unlock_challenges = await self.data.static.get_unlock_challenges(self.version)
game_unlock_challenge_condition_list = []
@@ -84,8 +82,8 @@ class ChuniVerse(ChuniLuminousPlus):
unlock_condition = conditions.get(
unlock_challenge_id,
{
"type": MapAreaConditionType.ALWAYS_UNLOCKED.value, # always unlocked
"conditionId": -1,
"type": MapAreaConditionType.TROPHY_OBTAINED.value, # always unlocked
"conditionId": 0,
},
)