Skip to content

Commit

Permalink
✨ Add new fields to SpaceInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
mobyw committed May 26, 2024
1 parent 7289cf6 commit f6a70cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion mihomo/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,12 @@ async def parse_api_data(
player_info.space_info = SpaceInfo(
memory_data=memory_info,
universe_level=space_info.maxRogueChallengeScore,
light_cone_count=space_info.equipmentCount,
avatar_count=space_info.avatarCount,
light_cone_count=space_info.equipmentCount,
relic_count=space_info.relicCount,
achievement_count=space_info.achievementCount,
book_count=space_info.bookCount,
music_count=space_info.musicCount,
)
pos_dict: Dict[str, List[int]] = {}
characters: List[CharacterInfo] = []
Expand Down
5 changes: 4 additions & 1 deletion mihomo/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@ class MemoryInfo(Struct):
class SpaceInfo(Struct):
memory_data: Optional[MemoryInfo] = None
universe_level: int = 0
light_cone_count: int = 0
avatar_count: int = 0
light_cone_count: int = 0
relic_count: int = 0
achievement_count: int = 0
book_count: int = 0
music_count: int = 0


class PlayerInfo(Struct):
Expand Down

0 comments on commit f6a70cb

Please sign in to comment.