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

fix bad logic with fallback announcer config option #103

Merged
merged 3 commits into from
Mar 30, 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
2 changes: 1 addition & 1 deletion RetakesPlugin/Modules/Configs/RetakesConfigData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ public class RetakesConfigData
public string QueuePriorityFlag { get; set; } = "@css/vip";
public bool IsDebugMode { get; set; } = false;
public bool ShouldForceEvenTeamsWhenPlayerCountIsMultipleOf10 { get; set; } = true;
public bool EnableFallbackBombsiteAnnouncement { get; set; }
public bool EnableFallbackBombsiteAnnouncement { get; set; } = true;
}
3 changes: 2 additions & 1 deletion RetakesPlugin/RetakesPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,8 @@ public HookResult OnRoundStart(EventRoundStart @event, GameEventInfo info)

_planter = _spawnManager.HandleRoundSpawns(_currentBombsite, _gameManager.QueueManager.ActivePlayers);

if (_retakesConfig?.RetakesConfigData?.EnableFallbackBombsiteAnnouncement is true or null)
if (!RetakesConfig.IsLoaded(_retakesConfig) ||
_retakesConfig!.RetakesConfigData!.EnableFallbackBombsiteAnnouncement)
{
AnnounceBombsite(_currentBombsite);
}
Expand Down
Loading