Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAL: remove door lock in Central Dynamo #101

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/patches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8836,6 +8836,23 @@
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

Check warning on line 8848 in src/patches.rs

View workflow job for this annotation

GitHub Actions / Linux

unused variable: `locked_door_actor_obj`

Check warning on line 8848 in src/patches.rs

View workflow job for this annotation

GitHub Actions / Linux

unused variable: `locked_door_actor_obj`

Check warning on line 8848 in src/patches.rs

View workflow job for this annotation

GitHub Actions / macOS

unused variable: `locked_door_actor_obj`

Check warning on line 8848 in src/patches.rs

View workflow job for this annotation

GitHub Actions / macOS

unused variable: `locked_door_actor_obj`

Check warning on line 8848 in src/patches.rs

View workflow job for this annotation

GitHub Actions / Windows

unused variable: `locked_door_actor_obj`

Check warning on line 8848 in src/patches.rs

View workflow job for this annotation

GitHub Actions / Windows

unused variable: `locked_door_actor_obj`
JeffGainsNGames marked this conversation as resolved.
Show resolved Hide resolved
.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,
Expand Down Expand Up @@ -14563,6 +14580,10 @@
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,
);
}
}

Expand Down
Loading