From 94faf7fc6df620a6a9c6f3651bc0e657a42576c4 Mon Sep 17 00:00:00 2001 From: UserR00T Date: Thu, 31 May 2018 15:56:01 +0200 Subject: [PATCH] You can now change the report reasons whoooo --- source/BP-Essentials/EssentialsVariables.cs | 3 ++- .../Methods/FileHandler/ReadFile.cs | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/source/BP-Essentials/EssentialsVariables.cs b/source/BP-Essentials/EssentialsVariables.cs index eb43d581..e3533433 100644 --- a/source/BP-Essentials/EssentialsVariables.cs +++ b/source/BP-Essentials/EssentialsVariables.cs @@ -7,7 +7,7 @@ namespace BP_Essentials { public class EssentialsVariablesPlugin : EssentialsCorePlugin { - public const string Version = "2.4.1"; + public const string Version = "2.4.3"; // Generic Constants public const string FileDirectory = "Essentials/"; @@ -185,6 +185,7 @@ public class EssentialsVariablesPlugin : EssentialsCorePlugin public static string[] ReportReasons = { + // default values "Random Vote Kick", "Committing suicide/Disconnecting while arrested", "Hacks/Exploits/Cheats", diff --git a/source/BP-Essentials/Methods/FileHandler/ReadFile.cs b/source/BP-Essentials/Methods/FileHandler/ReadFile.cs index 8d2ea25f..c53f076e 100644 --- a/source/BP-Essentials/Methods/FileHandler/ReadFile.cs +++ b/source/BP-Essentials/Methods/FileHandler/ReadFile.cs @@ -61,6 +61,19 @@ public class FunctionUI public string AccessSetStatsMenu { get; set; } } [Serializable] + public class ReportOptions + { + public string F2 { get; set; } + public string F3 { get; set; } + public string F4 { get; set; } + public string F5 { get; set; } + public string F6 { get; set; } + public string F7 { get; set; } + public string F8 { get; set; } + public string F9 { get; set; } + public string F10 { get; set; } + } + [Serializable] public class _Misc { public bool enableChatBlock { get; set; } @@ -87,6 +100,7 @@ public class __RootObject public _Messages Messages { get; set; } public MessageColors MessageColors { get; set; } public FunctionUI FunctionUI { get; set; } + public ReportOptions ReportOptions { get; set; } public _Misc Misc { get; set; } public List<_Command> Commands { get; set; } } @@ -146,6 +160,8 @@ public static void Run(string fileName) AccessSetStatsMenu = m.FunctionUI.AccessSetStatsMenu; AccessCWMenu = m.FunctionUI.AccessCWMenu; + ReportReasons = new string[] { m.ReportOptions.F2, m.ReportOptions.F3, m.ReportOptions.F4, m.ReportOptions.F5, m.ReportOptions.F6, m.ReportOptions.F7, m.ReportOptions.F8, m.ReportOptions.F9, m.ReportOptions.F10 }; + EnableBlockSpawnBot = m.Misc.EnableBlockSpawnBot; LanguageBlock = m.Misc.enableLanguageBlock; ChatBlock = m.Misc.enableChatBlock;