Skip to content

Commit

Permalink
Fix flipped tiles on minimap
Browse files Browse the repository at this point in the history
  • Loading branch information
ThanatosGit committed Mar 31, 2024
1 parent 6976088 commit 9d3f96b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/open_samus_returns_rando/specific_patches/door_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ def patch_minimap(self, editor, scenario_name, actor_name, left_shield_name, rig
elif len(tiles_for_door) != 2:
raise ValueError("Found not exactly two tiles")

# sometimes it finds right tile first and left second, so flip it because
# tiles_for_door[0] should always be left and tiles_for_door[1] always be right
if tiles_for_door[0].tile_coordinates[0] > tiles_for_door[1].tile_coordinates[0]:
tiles_for_door.insert(0, tiles_for_door.pop())

# find the icons of the tile
left_tile_icon = next(
(y for y in tiles_for_door[0].icons if "Door" in y.actor_name or "Shield" in y.actor_name), None
Expand Down

0 comments on commit 9d3f96b

Please sign in to comment.