Skip to content

Commit 640f0f8

Browse files
Add contributors list and update plugin info
1 parent c5f7859 commit 640f0f8

File tree

5 files changed

+70
-8
lines changed

5 files changed

+70
-8
lines changed

FlagSystem/Structures/Flag.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Linq;
44
using System.Reflection;
55
using LabApi.Features.Console;
6-
using SER.Helpers;
76
using SER.Helpers.ResultSystem;
87
using FlagDictionary = System.Collections.Generic.Dictionary<string,
98
(

Helpers/Extensions/StringExtensions.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,22 @@ public static Result AsError(this string error)
2929
{
3030
return new Result(false, error);
3131
}
32+
33+
[Pure]
34+
public static string Spaceify(this string str)
35+
{
36+
string res = "";
37+
for (var index = 0; index < str.Length; index++)
38+
{
39+
var c = str[index];
40+
if (char.IsUpper(c) && index != 0)
41+
{
42+
res += " ";
43+
}
44+
45+
res += c;
46+
}
47+
48+
return res;
49+
}
3250
}

MethodSystem/Methods/HealthMethods/HealMethod.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using SER.ArgumentSystem.Arguments;
1+
using SER.ArgumentSystem.Arguments;
32
using SER.ArgumentSystem.BaseArguments;
43
using SER.MethodSystem.BaseMethods;
54

Plugin/Commands/HelpSystem/HelpInfoStorage.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using LabApi.Features.Enums;
55
using MapGeneration;
66
using SER.FlagSystem.Flags;
7-
using SER.FlagSystem.Structures;
87
using SER.TokenSystem.Tokens;
98

109
namespace SER.Plugin.Commands.HelpSystem;

Plugin/MainPlugin.cs

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
using System;
2+
using System.Linq;
23
using JetBrains.Annotations;
34
using LabApi.Features;
45
using LabApi.Features.Console;
56
using MEC;
67
using SER.FlagSystem.Structures;
7-
using SER.Helpers;
8+
using SER.Helpers.Extensions;
89
using SER.MethodSystem;
910
using SER.MethodSystem.Methods.LiteralVariableMethods;
1011
using SER.ScriptSystem;
@@ -23,10 +24,32 @@ public class MainPlugin : LabApi.Loader.Features.Plugins.Plugin
2324
public override Version RequiredApiVersion => LabApiProperties.CurrentVersion;
2425
public override Version Version => new(0, 3, 0);
2526

26-
public static string GitHubLink => "https://github.com/Elektryk-Andrzej/ScriptedEventsReloaded";
27-
public static string WikiLink => GitHubLink + "/wiki";
27+
public static string GitHubLink => "https://github.com/ScriptedEvents/ScriptedEventsReloaded";
2828
public static string HelpCommandName => "serhelp";
2929
public static MainPlugin Instance { get; private set; } = null!;
30+
31+
public record struct Contributor(string Name, Contribution Contribution);
32+
33+
[Flags]
34+
public enum Contribution
35+
{
36+
None = 0,
37+
Developer = 1 << 1,
38+
QualityAssurance = 1 << 2,
39+
Sponsor = 1 << 3,
40+
Betatester = 1 << 4,
41+
EarlyAdopter = 1 << 5
42+
}
43+
44+
public static Contributor[] Contributors =>
45+
[
46+
new(Instance.Author, Contribution.Developer),
47+
new("Whitty985playz", Contribution.QualityAssurance | Contribution.EarlyAdopter),
48+
new("Jraylor", Contribution.Sponsor),
49+
new("Luke", Contribution.Sponsor),
50+
new("Krzysiu Wojownik", Contribution.QualityAssurance),
51+
new("Raging Tornado", Contribution.Betatester)
52+
];
3053

3154
public override void Enable()
3255
{
@@ -46,6 +69,31 @@ public override void Enable()
4669
};
4770

4871
Timing.CallDelayed(1.5f, FileSystem.Initialize);
72+
Logger.Raw(
73+
"""
74+
#####################################
75+
█████████ ██████████ ███████████
76+
███░░░░░███░░███░░░░░█░░███░░░░░███
77+
░███ ░░░ ░███ █ ░ ░███ ░███
78+
░░█████████ ░██████ ░██████████
79+
░░░░░░░░███ ░███░░█ ░███░░░░░███
80+
███ ░███ ░███ ░ █ ░███ ░███
81+
░░█████████ ██████████ █████ █████
82+
░░░░░░░░░ ░░░░░░░░░░ ░░░░░ ░░░░░
83+
#####################################
84+
85+
This project would not be possible without the help of:
86+
87+
""" + Contributors
88+
.Select(c => $"> {c.Name} as {c
89+
.Contribution
90+
.GetFlags()
91+
.Select(f => f.ToString().Spaceify())
92+
.JoinStrings(", ")}"
93+
)
94+
.JoinStrings("\n"),
95+
ConsoleColor.Cyan
96+
);
4997
}
5098

5199
public override void Disable()
@@ -61,7 +109,6 @@ private void OnServerFullyInit()
61109
62110
Help command: {HelpCommandName}
63111
GitHub repository: {GitHubLink}
64-
Wiki page: {WikiLink}
65112
""",
66113
ConsoleColor.Cyan
67114
);

0 commit comments

Comments
 (0)