Skip to content

Commit

Permalink
Support for new MEDS
Browse files Browse the repository at this point in the history
  • Loading branch information
ThanatosGit committed Jul 14, 2024
1 parent d88582c commit 66a6370
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/open_samus_returns_rando/specific_patches/static_fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ def fix_wrong_cc_actor_deletions(editor: PatcherEditor) -> None:
"unk2": 0,
"unk3": 0,
"respawn_time": 0.0,
"name1": "sg_casca38",
"name2": ""
"model_name": "sg_casca38",
"vignette_name": ""
})
BOMB_GROUP = Container(
unk_bool=True,
Expand Down Expand Up @@ -272,7 +272,7 @@ def fix_wrong_cc_actor_deletions(editor: PatcherEditor) -> None:
new_group = copy.deepcopy(BOMB_GROUP)
new_block = copy.deepcopy(CUSTOM_BLOCK)
new_block["pos"] = pos
new_block["name1"] = sg_casca
new_block["model_name"] = sg_casca
types: ListContainer = typing.cast(ListContainer, new_group["types"])
types[0]["blocks"].append(new_block)
bmsbk.raw.block_groups.append(new_group)
Expand Down Expand Up @@ -331,17 +331,17 @@ def disable_vignettes(editor: PatcherEditor) -> None:
block["name2"] = ""

bmssd = editor.get_file(f"maps/levels/c10_samus/{scenario_name}/{scenario_name}.bmssd", Bmssd)
sg_group = bmssd.raw["unk_structs_b"]
sg_group = bmssd.raw["scene_groups"]
vignette_models = vignette_object["vignette_models"]
for camera in vignette_object["cc"]:
cc_name = "sg_SubArea_collision_camera_" + camera
for sg in sg_group:
# Check for the cc_name
if sg["str1"] == cc_name:
for cc_group in sg["struct3"]:
model_group = cc_group["struct5"]
if sg["sg_name"] == cc_name:
for cc_group in sg["model_groups"]:
model_group = cc_group["models"]
for idx, model in reversed(list(enumerate(model_group))):
if any(model["int6"] == vignette for vignette in vignette_models):
if any(model["model_id"] == vignette for vignette in vignette_models):
# Remove the model to prevent it from loading
model_group.pop(idx)

Expand All @@ -359,4 +359,4 @@ def apply_static_fixes(editor: PatcherEditor) -> None:
patch_area7_item(editor)
patch_a4_collision(editor)
patch_a1_teleporter_crumbles(editor)
disable_vignettes(editor)
# disable_vignettes(editor)

0 comments on commit 66a6370

Please sign in to comment.