Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added config to enable / disable round type announcements #49

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions RetakesAllocator/RetakesAllocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions RetakesAllocatorCore/Config/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
2 changes: 1 addition & 1 deletion RetakesAllocatorCore/PluginInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}] ";
Expand Down