Skip to content

Commit

Permalink
Fix tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
balt-dev committed Sep 15, 2024
1 parent 0758e85 commit 2d98d54
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/cogs/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,17 +391,15 @@ async def render_full_frame(self,
elif isinstance(tile.sprite, np.ndarray):
sprite = tile.sprite[(tile.frame * 3) + frame]
else:
path_fallback = None
source, sprite_name = tile.sprite
path = f"data/sprites/{source}/{sprite_name}_{tile.frame}_{frame + 1}.png"
if source == constants.BABA_WORLD:
if tile.name == "icon":
path = f"data/sprites/{source}/{sprite_name}.png"
elif tile.name in ("smiley", "hi") or tile.name.startswith("icon"):
path = f"data/sprites/{source}/{sprite_name}_1.png"
elif tile.name == "default":
path = f"data/sprites/{source}/default_{frame + 1}.png"
else:
path = f"data/sprites/{source}/{sprite_name}_{tile.frame}_{frame + 1}.png"
try:
sprite = cached_open(
path, cache=raw_sprite_cache, fn=Image.open).convert("RGBA")
Expand Down

0 comments on commit 2d98d54

Please sign in to comment.