diff --git a/src/open_samus_returns_rando/files/schema.json b/src/open_samus_returns_rando/files/schema.json index f8207d4..1728275 100644 --- a/src/open_samus_returns_rando/files/schema.json +++ b/src/open_samus_returns_rando/files/schema.json @@ -283,7 +283,12 @@ }, "required": [ "final_boss" - ] + ], + "default": { + "objective": { + "final_boss": "Ridley" + } + } }, "game_patches": { "type": "object", diff --git a/src/open_samus_returns_rando/misc_patches/final_boss.py b/src/open_samus_returns_rando/misc_patches/final_boss.py index 3d1deaa..707bb40 100644 --- a/src/open_samus_returns_rando/misc_patches/final_boss.py +++ b/src/open_samus_returns_rando/misc_patches/final_boss.py @@ -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": diff --git a/src/open_samus_returns_rando/pickups/custom_pickups.py b/src/open_samus_returns_rando/pickups/custom_pickups.py index bdc9e5d..6bf71fa 100644 --- a/src/open_samus_returns_rando/pickups/custom_pickups.py +++ b/src/open_samus_returns_rando/pickups/custom_pickups.py @@ -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) diff --git a/src/open_samus_returns_rando/samus_returns_patcher.py b/src/open_samus_returns_rando/samus_returns_patcher.py index 8c0ea69..09a7d00 100644 --- a/src/open_samus_returns_rando/samus_returns_patcher.py +++ b/src/open_samus_returns_rando/samus_returns_patcher.py @@ -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 @@ -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)