From b32c0f6ee2198c943b6c42738424659917eab928 Mon Sep 17 00:00:00 2001 From: data-bomb Date: Sat, 22 Jun 2024 08:07:12 -0700 Subject: [PATCH] Cheating Announcement - Announces when authorized admins have enabled cheats to curb abuse and enhance fairness for all players - Currently the admin name responsible is not broadcast in chat but it is captured in the logs for review --- Si_AdminMod/Console_PlayerCmds.cs | 9 +++++++++ Si_AdminMod/ModAttributes.cs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Si_AdminMod/Console_PlayerCmds.cs b/Si_AdminMod/Console_PlayerCmds.cs index 6f8d0f2..a33a5fa 100644 --- a/Si_AdminMod/Console_PlayerCmds.cs +++ b/Si_AdminMod/Console_PlayerCmds.cs @@ -120,6 +120,15 @@ public static bool Prefix(string __0, bool __1, Player __2) MelonLogger.Msg("Received remote command string: " + __0 + " from " + __2.PlayerName); + // is an admin trying to enable/disable cheats? + if (String.Equals(__0, "cheats", StringComparison.OrdinalIgnoreCase)) + { + if (__2.AdminLevel >= EAdminLevel.STANDARD) + { + HelperMethods.AlertAdminAction(null, (Game.CheatsEnabled ? "disabled cheats" : "ENABLED CHEATS")); + } + } + // are they trying to run a command registered by SAM? if (IsValidConsoleCommand(__0)) { diff --git a/Si_AdminMod/ModAttributes.cs b/Si_AdminMod/ModAttributes.cs index b292ec7..bba036f 100644 --- a/Si_AdminMod/ModAttributes.cs +++ b/Si_AdminMod/ModAttributes.cs @@ -21,7 +21,7 @@ You should have received a copy of the GNU General Public License using SilicaAdminMod; using System.Drawing; -[assembly: MelonInfo(typeof(SiAdminMod), "Admin Mod", "2.0.785", "databomb", "https://github.com/data-bomb/Silica")] +[assembly: MelonInfo(typeof(SiAdminMod), "Admin Mod", "2.0.816", "databomb", "https://github.com/data-bomb/Silica")] [assembly: MelonGame("Bohemia Interactive", "Silica")] // Color.Cyan