Skip to content

Commit

Permalink
Fix formats parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Parnassius committed Sep 7, 2024
1 parent cd944d0 commit 73dbc3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cerbottana/handlers/formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ async def formats(msg: ProtocolMessage) -> None:
section = tier
section_next = False
continue
parts = tier.split(",")
tier_name, _, tier_code = tier.rpartition(",")
if section is not None:
tier_id = utils.to_id(parts[0])
code = int(parts[1], 16)
tier_id = utils.to_id(tier_name)
code = int(tier_code, 16)
tiers[tier_id] = Tier(
tier_id,
parts[0], # name
tier_name,
section,
bool(code & 1), # random
# bool(code & 2), # ladder
Expand Down

0 comments on commit 73dbc3b

Please sign in to comment.