From a4834b5dee0325fc856476a1bc72a37e0ea83790 Mon Sep 17 00:00:00 2001
From: Rysik5318 <72207886+Rysik5318@users.noreply.github.com>
Date: Tue, 24 Dec 2024 23:30:32 +0400
Subject: [PATCH] Update Locker.cs
---
EXILED/Exiled.API/Exiled.API.csproj | 1 +
EXILED/Exiled.API/Features/Lockers/Locker.cs | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/EXILED/Exiled.API/Exiled.API.csproj b/EXILED/Exiled.API/Exiled.API.csproj
index 988d63157..3d6605c62 100644
--- a/EXILED/Exiled.API/Exiled.API.csproj
+++ b/EXILED/Exiled.API/Exiled.API.csproj
@@ -37,6 +37,7 @@
+
diff --git a/EXILED/Exiled.API/Features/Lockers/Locker.cs b/EXILED/Exiled.API/Features/Lockers/Locker.cs
index 739015590..d19ed7dbe 100644
--- a/EXILED/Exiled.API/Features/Lockers/Locker.cs
+++ b/EXILED/Exiled.API/Features/Lockers/Locker.cs
@@ -91,6 +91,15 @@ public Locker(BaseLocker locker)
///
public IReadOnlyCollection Chambers { get; }
+ ///
+ /// Gets or sets a value indicating whether the locker is currently open.
+ ///
+ public bool IsOpen
+ {
+ get => Chambers.FirstOrDefault().IsOpen;
+ set => Chambers.FirstOrDefault().IsOpen = value;
+ }
+
///
/// Gets or sets an id for manipulating opened chambers.
///