From 0eefd7f9d4cd60aad6a87f917430376a1a55a872 Mon Sep 17 00:00:00 2001 From: B3none Date: Fri, 12 Jan 2024 20:09:46 +0000 Subject: [PATCH 1/2] Added config to enable / disable round type announcements --- RetakesAllocator/RetakesAllocator.cs | 9 ++++++--- RetakesAllocatorCore/Config/Configs.cs | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/RetakesAllocator/RetakesAllocator.cs b/RetakesAllocator/RetakesAllocator.cs index f6e7984..e58ab1a 100644 --- a/RetakesAllocator/RetakesAllocator.cs +++ b/RetakesAllocator/RetakesAllocator.cs @@ -308,9 +308,12 @@ out var currentRoundType _currentRoundType = currentRoundType; _nextRoundType = null; - Server.PrintToChatAll( - $"{MessagePrefix}{Enum.GetName(_currentRoundType.Value)} Round" - ); + if (Configs.GetConfigData().EnableRoundTypeAnnouncement) + { + Server.PrintToChatAll( + $"{MessagePrefix}{Enum.GetName(_currentRoundType.Value)} Round" + ); + } return HookResult.Continue; } diff --git a/RetakesAllocatorCore/Config/Configs.cs b/RetakesAllocatorCore/Config/Configs.cs index 1fbd93b..41277f7 100644 --- a/RetakesAllocatorCore/Config/Configs.cs +++ b/RetakesAllocatorCore/Config/Configs.cs @@ -106,6 +106,7 @@ public record ConfigData public bool MigrateOnStartup { get; set; } = true; public bool AllowAllocationAfterFreezeTime { get; set; } = false; + public bool EnableRoundTypeAnnouncement { get; set; } = true; public void Validate() { From 293c8ac6cb6d831a22d95e7d7aa6fd4932a25695 Mon Sep 17 00:00:00 2001 From: B3none Date: Fri, 12 Jan 2024 20:10:02 +0000 Subject: [PATCH 2/2] Bump version --- RetakesAllocatorCore/PluginInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RetakesAllocatorCore/PluginInfo.cs b/RetakesAllocatorCore/PluginInfo.cs index 5e1b0c0..c141a6b 100644 --- a/RetakesAllocatorCore/PluginInfo.cs +++ b/RetakesAllocatorCore/PluginInfo.cs @@ -4,7 +4,7 @@ namespace RetakesAllocatorCore; public static class PluginInfo { - public const string Version = "1.0.9"; + public const string Version = "1.0.10"; public static readonly string LogPrefix = $"[RetakesAllocator {Version}] "; public static readonly string MessagePrefix = $"[{ChatColors.Green}Retakes{ChatColors.White}] ";