Skip to content

Commit

Permalink
enhance(rlstats): stop using hard-coded max season rewards level
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackenmen committed Nov 3, 2024
1 parent fca0356 commit ab3d4a5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rlstats/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def _draw_platform(self, w: int) -> None:

def _draw_season_rewards(self) -> None:
self._draw_season_reward_lvl()
if self.player.season_rewards.level != 8:
if self.player.season_rewards.next_level is not None:
self._draw_season_reward_bars()
self._draw_season_reward_wins()

Expand Down Expand Up @@ -247,7 +247,6 @@ def _draw_season_reward_wins(self) -> None:
# season_rewards_wins_max has font name defined
assert isinstance(font_name, str), "mypy"
font = self.template.fonts[font_name]
# TODO: rlapi package should define max
w, h = font.getsize("10")
coords -= (w, h / 2)
self._draw.text(xy=coords, text="10", font=font, fill=fill)
Expand Down

0 comments on commit ab3d4a5

Please sign in to comment.