From 5ba694fc3f20f6d9a8b56b9ea5c0b822fccd522b Mon Sep 17 00:00:00 2001 From: Thanatos Date: Tue, 21 May 2024 20:53:30 +0200 Subject: [PATCH 1/2] Support for new MEDS --- .../specific_patches/door_patches.py | 4 ++-- .../specific_patches/metroid_patches.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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 010960ff..a4f44f1c 100644 --- a/src/open_samus_returns_rando/specific_patches/door_patches.py +++ b/src/open_samus_returns_rando/specific_patches/door_patches.py @@ -39,7 +39,7 @@ "unk2": 1, "unk3": 0, "args": Container({ - 601445949: Container({ # type: ignore + "CallbackName": Container({ "type": "s", "value": "RemoveDoors", }), @@ -562,7 +562,7 @@ def add_custom_shields(editor: PatcherEditor, new_shield: NewShield) -> None: # Remove the drops from breaking the shield custom_shield.raw["components"].pop("DROP") # Remove the particle animation that occurs after the shield breaks (color mismatch) - custom_shield.raw["action_sets"][0]["animations"][0]["events0"][1]["args"][729149823]["value"] = 0 + custom_shield.raw["action_sets"][0]["animations"][0]["events0"][1]["args"]["LinkType"]["value"] = 0 elif new_shield.base_shield in {"doorshieldsupermissile", "doorshieldpowerbomb"}: # Some shaders do not use dissolve fx, so force fx to be used custom_shield.raw["components"]["LIFE"]["fields"]["bDisolveByMaterial"]["value"] = False diff --git a/src/open_samus_returns_rando/specific_patches/metroid_patches.py b/src/open_samus_returns_rando/specific_patches/metroid_patches.py index ccd09dae..1c073841 100644 --- a/src/open_samus_returns_rando/specific_patches/metroid_patches.py +++ b/src/open_samus_returns_rando/specific_patches/metroid_patches.py @@ -27,9 +27,9 @@ def _patch_metroids(editor: PatcherEditor) -> None: death_callbacks = [ item for events in events0 - for magic_number, item in events["args"].items() - # arguments with this number defines the function to call - if magic_number == 601445949 + for parameter_name, item in events["args"].items() + # check if this event defines a CallbackName + if parameter_name == "CallbackName" ] for death_callback in death_callbacks: death_callback["value"] = "RemoveMetroid" From f7cebef4d18b7ad3a56aeb8e2d862946df6606d2 Mon Sep 17 00:00:00 2001 From: Thanatos Date: Wed, 22 May 2024 17:54:19 +0200 Subject: [PATCH 2/2] Bump MEDS --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 10313507..9031c2d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ ] requires-python = ">=3.10" dependencies = [ - "mercury-engine-data-structures>=0.27.0", + "mercury-engine-data-structures>=0.30.0", "jsonschema>=4.0.0", "ips.py>=0.1.2", ]