Skip to content
Merged
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
14 changes: 13 additions & 1 deletion EXILED/Exiled.API/Features/Doors/Door.cs
Original file line number Diff line number Diff line change
Expand Up @@ -518,10 +518,22 @@ public void ChangeLock(DoorLockType lockType)
/// <param name="lockType">The <see cref="Enums.DoorLockType"/> of the lockdown.</param>
public void Lock(float time, DoorLockType lockType)
{
ChangeLock(lockType);
Lock(lockType);
Unlock(time, lockType);
}

/// <summary>
/// Locks all active locks on the door for infinite time.
/// </summary>
/// <param name="lockType">The <see cref="Enums.DoorLockType"/> of the lockdown.</param>
public void Lock(DoorLockType lockType)
{
DoorLockType locks = DoorLockType;
locks |= lockType;
Base.NetworkActiveLocks = (ushort)locks;
DoorEvents.TriggerAction(Base, IsLocked ? DoorAction.Locked : DoorAction.Unlocked, null);
}

/// <summary>
/// Unlocks and clears all active locks on the door.
/// </summary>
Expand Down