From 528d0481935c97f9c825fc21d018349c6b8d30c1 Mon Sep 17 00:00:00 2001 From: JeffGainsNGames Date: Mon, 9 Dec 2024 21:03:36 -0500 Subject: [PATCH 1/2] PAL: remove door lock in Central Dynamo --- src/patches.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/patches.rs b/src/patches.rs index fbf65366..c693a119 100644 --- a/src/patches.rs +++ b/src/patches.rs @@ -8836,6 +8836,23 @@ fn patch_main_quarry_door_lock_pal( Ok(()) } +fn patch_cen_dyna_door_lock_pal( + _ps: &mut PatcherState, + area: &mut mlvl_wrapper::MlvlArea, +) -> Result<(), String> { + let scly = area.mrea().scly_section_mut(); + let layer = &mut scly.layers.as_mut_vec()[1]; + + let locked_door_actor_obj_id = 0x001b06a1; // Door Lock to Quarantine Access A + + let locked_door_actor_obj = layer + .objects + .as_mut_vec() + .retain(|obj| obj.instance_id & 0x00FFFFFF != locked_door_actor_obj_id); + + Ok(()) +} + fn patch_mines_security_station_soft_lock( _ps: &mut PatcherState, area: &mut mlvl_wrapper::MlvlArea, @@ -14563,6 +14580,10 @@ fn patch_qol_game_breaking( resource_info!("01_mines_mainplaza.MREA").into(), patch_main_quarry_door_lock_pal, ); + patcher.add_scly_patch( + resource_info!("07_mines_electric.MREA").into(), + patch_cen_dyna_door_lock_pal, + ); } } From 53edc38640c92359fbba13576c2cd908d0707e7e Mon Sep 17 00:00:00 2001 From: JeffGainsNGames Date: Mon, 9 Dec 2024 22:05:12 -0500 Subject: [PATCH 2/2] remove variable --- src/patches.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/patches.rs b/src/patches.rs index c693a119..1a58df21 100644 --- a/src/patches.rs +++ b/src/patches.rs @@ -8845,7 +8845,7 @@ fn patch_cen_dyna_door_lock_pal( let locked_door_actor_obj_id = 0x001b06a1; // Door Lock to Quarantine Access A - let locked_door_actor_obj = layer + layer .objects .as_mut_vec() .retain(|obj| obj.instance_id & 0x00FFFFFF != locked_door_actor_obj_id);