Skip to content

Commit 88c0c40

Browse files
add DecontaminationMethod.cs
1 parent 1b8e91a commit 88c0c40

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using LabApi.Features.Wrappers;
2+
using LightContainmentZoneDecontamination;
3+
using SER.ArgumentSystem.Arguments;
4+
using SER.ArgumentSystem.BaseArguments;
5+
using SER.Helpers.Exceptions;
6+
using SER.MethodSystem.BaseMethods;
7+
8+
namespace SER.MethodSystem.Methods.MapMethods;
9+
10+
public class DecontaminationMethod : SynchronousMethod
11+
{
12+
public override string Description => "Controls the LCZ decontamination.";
13+
14+
public override Argument[] ExpectedArguments { get; } =
15+
[
16+
new OptionsArgument("mode",
17+
"enable",
18+
"disable",
19+
"force"
20+
)
21+
];
22+
23+
public override void Execute()
24+
{
25+
Decontamination.Status = Args.GetOption("mode") switch
26+
{
27+
"enable" => DecontaminationController.DecontaminationStatus.None,
28+
"disable" => DecontaminationController.DecontaminationStatus.Disabled,
29+
"force" => DecontaminationController.DecontaminationStatus.Forced,
30+
_ => throw new AndrzejFuckedUpException()
31+
};
32+
}
33+
}

0 commit comments

Comments
 (0)