Skip to content

Commit

Permalink
feat: Add Chamber.IsOpen (#335)
Browse files Browse the repository at this point in the history
* Delete .github/dependabot.yml

* Update push_nuget.yml

* Update dev.yml

* ci: add a new workflow to validate pr title (#312)

* ci: add a new workflow to validate pr title

* refactor: edit `pull_request_opened` workflow to add "valide PR title" check

* refactor: remove previous workflow for pr title

* refactor: a small change on the name of each job

* refactor: missing branches target

* XMAS NW_documentation

* Update Chamber.cs

* Update Exiled.API.csproj

* Update EXILED/Exiled.API/Exiled.API.csproj

Co-authored-by: Yamato <[email protected]>

* Update Chamber.cs

* Update Locker.cs

* Update Locker.cs

* Oops

* Update Locker.cs

* Update Locker.cs

---------

Co-authored-by: Misaka-ZeroTwo <[email protected]>
Co-authored-by: Bolton <[email protected]>
Co-authored-by: Yamato <[email protected]>
Co-authored-by: Yamato <[email protected]>
  • Loading branch information
5 people authored Dec 27, 2024
1 parent 0508c8a commit bcbffda
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions EXILED/Exiled.API/Exiled.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<Reference Include="UnityEngine.CoreModule" HintPath="$(EXILED_REFERENCES)\UnityEngine.CoreModule.dll" Private="false" />
<Reference Include="UnityEngine.ParticleSystemModule" HintPath="$(EXILED_REFERENCES)\UnityEngine.ParticleSystemModule.dll" Private="false" />
<Reference Include="UnityEngine.PhysicsModule" HintPath="$(EXILED_REFERENCES)\UnityEngine.PhysicsModule.dll" Private="false" />
<Reference Include="UnityEngine.AudioModule" HintPath="$(EXILED_REFERENCES)\UnityEngine.AudioModule.dll" Private="false" />
<Reference Include="YamlDotNet" HintPath="$(EXILED_REFERENCES)\YamlDotNet.dll" Private="false" />
</ItemGroup>

Expand Down
12 changes: 10 additions & 2 deletions EXILED/Exiled.API/Features/Lockers/Chamber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,17 @@ public float Cooldown
}

/// <summary>
/// Gets a value indicating whether the chamber is currently open.
/// Gets or sets a value indicating whether the chamber is currently open.
/// </summary>
public bool IsOpen => Base.IsOpen;
public bool IsOpen
{
get => Base.IsOpen;
set
{
Base.SetDoor(value, null);
Locker.Base.RefreshOpenedSyncvar();
}
}

/// <summary>
/// Gets the id of this chamber in <see cref="Locker"/>.
Expand Down
2 changes: 1 addition & 1 deletion EXILED/Exiled.API/Features/Lockers/Locker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public void AddItem(Pickup item)
: chamber.Spawnpoint;

// If the chamber is open, immediately set the item's parent and spawn it.
if (chamber.Base.IsOpen)
if (chamber.IsOpen)
{
item.Transform.SetParent(parentTransform);
item.Spawn();
Expand Down
2 changes: 1 addition & 1 deletion EXILED/docs/articles/SCPSLRessources/NW_Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5019,4 +5019,4 @@ PlayerRoles.PlayableScps.Scp939.Scp939DamageHandler : AttackerDamageHandler
PlayerRoles.PlayableScps.Scp3114.Scp3114DamageHandler : AttackerDamageHandler

```
</details>
</details>

0 comments on commit bcbffda

Please sign in to comment.