diff --git a/src/open_samus_returns_rando/specific_patches/door_patches.py b/src/open_samus_returns_rando/specific_patches/door_patches.py index 3e2cae37..a306bda9 100644 --- a/src/open_samus_returns_rando/specific_patches/door_patches.py +++ b/src/open_samus_returns_rando/specific_patches/door_patches.py @@ -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