File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
MethodSystem/Methods/MapMethods Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments