Skip to content

Commit 21e38b9

Browse files
small exiled related upkeep
1 parent 7e2d68c commit 21e38b9

File tree

6 files changed

+12
-4
lines changed

6 files changed

+12
-4
lines changed

Code/Helpers/ExiledHelper.cs renamed to Code/Helpers/FrameworkExtensions/ExiledHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using MEC;
33
using Logger = LabApi.Features.Console.Logger;
44

5-
namespace SER.Code.Helpers;
5+
namespace SER.Code.Helpers.FrameworkExtensions;
66

77
public static class ExiledHelper
88
{

Code/MethodSystem/BaseMethods/Method.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ protected Method()
2626
Subgroup = type.Namespace?
2727
.Split('.')
2828
.LastOrDefault()?
29-
.WithCurrent(name => name[..^"Methods".Length])
29+
.WithCurrent(name =>
30+
{
31+
if (name.EndsWith("Methods")) return name[..^"Methods".Length];
32+
return name;
33+
})
34+
.Replace("_", " ")
3035
?? "Unknown";
3136

3237
var name = type.Name;

Code/MethodSystem/MethodIndex.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Reflection;
22
using LabApi.Features.Console;
33
using SER.Code.Helpers;
4+
using SER.Code.Helpers.FrameworkExtensions;
45
using SER.Code.Helpers.ResultSystem;
56
using SER.Code.MethodSystem.BaseMethods;
67
using SER.Code.MethodSystem.Structures;

Code/MethodSystem/Methods/PlayerDataMethods/ClearPlayerDataMethod.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public override void Execute()
2626
var players = Args.GetPlayers("players");
2727
var key = Args.GetText("key to clear");
2828

29-
var func = key.IsEmpty()
30-
? (Action<Dictionary<string, Value>>)(dict => dict.Clear())
29+
Action<Dictionary<string, Value>> func = key.IsEmpty()
30+
? dict => dict.Clear()
3131
: dict => dict.Remove(key);
3232

3333
players.ForEach(p =>

Code/Plugin/MainPlugin.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using SER.Code.FlagSystem.Flags;
88
using SER.Code.Helpers;
99
using SER.Code.Helpers.Extensions;
10+
using SER.Code.Helpers.FrameworkExtensions;
1011
using SER.Code.MethodSystem;
1112
using SER.Code.MethodSystem.Methods.PlayerDataMethods;
1213
using SER.Code.ScriptSystem;

SER.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
</ItemGroup>
101101
<ItemGroup>
102102
<Folder Include="Code\" />
103+
<Folder Include="Code\MethodSystem\Methods\EXILED_custom_roleMethods\" />
103104
</ItemGroup>
104105

105106
<!-- embedding dependencies into SER.dll -->

0 commit comments

Comments
 (0)