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

Decontamination API #230

Open
wants to merge 1 commit into
base: 13.1
Choose a base branch
from
Open
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
35 changes: 35 additions & 0 deletions NwPluginAPI/Core/Decontamination.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
namespace PluginAPI.Core
{
using LightContainmentZoneDecontamination;
using static LightContainmentZoneDecontamination.DecontaminationController;

/// <summary>
/// Manages the <see cref="DecontaminationController"/>.
/// </summary>
public static class Decontamination
{
/// <summary>
/// Gets the <see cref="DecontaminationController"/> singleton.
/// </summary>
public static readonly DecontaminationController Singleton = DecontaminationController.Singleton;

/// <summary>
/// Gets if Light Containment Zone is currently being decontaminated.
/// </summary>
public static bool IsDecontamination => Singleton.IsDecontaminating;

/// <summary>
/// Gets or sets the <see cref="DecontaminationStatus"/>.
/// </summary>
public static DecontaminationStatus Status
{
get => Singleton.DecontaminationOverride;
set => Singleton.NetworkDecontaminationOverride = value;
}

/// <summary>
/// Forces Light Containment Zone to be decontaminated.
/// </summary>
public static void ForceDecontamination() => Singleton.ForceDecontamination();
}
}