Skip to content

Commit 990df54

Browse files
Create FriendlyFireMethod.cs
1 parent d82c22c commit 990df54

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using JetBrains.Annotations;
2+
using SER.Code.ArgumentSystem.Arguments;
3+
using SER.Code.ArgumentSystem.BaseArguments;
4+
using SER.Code.MethodSystem.BaseMethods.Synchronous;
5+
6+
namespace SER.Code.MethodSystem.Methods.RoundMethods;
7+
8+
[UsedImplicitly]
9+
public class FriendlyFireMethod : SynchronousMethod
10+
{
11+
public override string Description => "Changes friendly fire mode.";
12+
13+
public override Argument[] ExpectedArguments { get; } =
14+
[
15+
new BoolArgument("enabled?")
16+
];
17+
18+
public override void Execute()
19+
{
20+
ServerConsole.FriendlyFire = Args.GetBool("enabled?");
21+
ServerConfigSynchronizer.Singleton.RefreshMainBools();
22+
}
23+
}

0 commit comments

Comments
 (0)