Skip to content

Commit

Permalink
Really fix schema
Browse files Browse the repository at this point in the history
  • Loading branch information
dyceron committed Aug 6, 2024
1 parent 6f21745 commit bfba210
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
7 changes: 6 additions & 1 deletion src/open_samus_returns_rando/files/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,12 @@
},
"required": [
"final_boss"
]
],
"default": {
"objective": {
"final_boss": "Ridley"
}
}
},
"game_patches": {
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion src/open_samus_returns_rando/misc_patches/final_boss.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def add_boss_triggers(editor: PatcherEditor, new_trigger: NewTrigger) -> None:
scenario_file.add_actor_to_entity_groups(entity_group, new_trigger.name, True)


def patch_custom_final_boss(editor: PatcherEditor, configuration: dict) -> None:
def patch_final_boss(editor: PatcherEditor, configuration: dict) -> None:
final_boss = configuration["objective"]["final_boss"]
game_patches = configuration["game_patches"]
if final_boss != "Ridley":
Expand Down
6 changes: 1 addition & 5 deletions src/open_samus_returns_rando/pickups/custom_pickups.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ def add_pickups(editor: PatcherEditor, new_pickup: NewPickups) -> None:

def patch_custom_pickups(editor: PatcherEditor, configuration: dict) -> None:
for new_pickup in new_pickups:
if (
"objective" in configuration
and configuration["objective"]["final_boss"] == "Ridley"
and new_pickup.name == "LE_Item_Ridley"
):
if configuration["objective"]["final_boss"] == "Ridley" and new_pickup.name == "LE_Item_Ridley":
continue
add_pickups(editor, new_pickup)
4 changes: 2 additions & 2 deletions src/open_samus_returns_rando/samus_returns_patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from open_samus_returns_rando.misc_patches.collision_camera_table import create_collision_camera_table
from open_samus_returns_rando.misc_patches.credits import patch_credits
from open_samus_returns_rando.misc_patches.elevators import patch_elevators
from open_samus_returns_rando.misc_patches.final_boss import patch_custom_final_boss
from open_samus_returns_rando.misc_patches.final_boss import patch_final_boss
from open_samus_returns_rando.misc_patches.spawn_points import patch_custom_spawn_points
from open_samus_returns_rando.misc_patches.text_patches import add_spiderboost_status, apply_text_patches
from open_samus_returns_rando.multiworld_integration import create_exefs_patches
Expand Down Expand Up @@ -95,7 +95,7 @@ def patch_extracted(input_path: Path, input_exheader: Path | None, output_path:
debug_spawn_points(editor, configuration["debug_spawn_points"])

# Custom final boss
patch_custom_final_boss(editor, configuration)
patch_final_boss(editor, configuration)

# Fix unheated heat rooms
patch_heat_rooms(editor)
Expand Down

0 comments on commit bfba210

Please sign in to comment.