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

fix: DoorType and RoomType for Checkpoint #379

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 7 additions & 1 deletion EXILED/Exiled.API/Features/Doors/Door.cs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,13 @@ private DoorType GetDoorType()
// Doors contains the DoorNameTagExtension component
"CHECKPOINT_LCZ_A" => DoorType.CheckpointLczA,
"CHECKPOINT_LCZ_B" => DoorType.CheckpointLczB,
"CHECKPOINT_EZ_HCZ_A" => DoorType.CheckpointEzHczA,

// TODO: Remove when it's fix https://git.scpslgame.com/northwood-qa/scpsl-bug-reporting/-/issues/782
"CHECKPOINT_EZ_HCZ_A" => Room?.Type switch
{
RoomType.HczEzCheckpointA => DoorType.CheckpointEzHczA,
_ => DoorType.CheckpointEzHczB,
},
"CHECKPOINT_EZ_HCZ_B" => DoorType.CheckpointEzHczB,
"106_PRIMARY" => DoorType.Scp106Primary,
"106_SECONDARY" => DoorType.Scp106Secondary,
Expand Down
4 changes: 2 additions & 2 deletions EXILED/Exiled.API/Features/Room.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,12 @@ private static RoomType FindType(GameObject gameObject)
"EZ_Shelter" => RoomType.EzShelter,
"EZ_HCZ_Checkpoint Part" => gameObject.transform.position.z switch
{
> 80 => RoomType.EzCheckpointHallwayA,
> 95 => RoomType.EzCheckpointHallwayA,
_ => RoomType.EzCheckpointHallwayB,
},
"HCZ_EZ_Checkpoint Part" => gameObject.transform.position.z switch
{
> 80 => RoomType.HczEzCheckpointA,
> 95 => RoomType.HczEzCheckpointA,
_ => RoomType.HczEzCheckpointB
},
_ => RoomType.Unknown,
Expand Down
Loading