Skip to content

Commit

Permalink
fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pxc1984 committed Jun 7, 2024
1 parent 22c48ab commit 68944f1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Content.Server/_Sunrise/StationEvents/Events/AnnounceRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ protected override void Ended(EntityUid uid, AnnounceRuleComponent component, Ga

private void DispatchAnnouncement(EntityUid uid, AnnounceRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
{
if (component.EnableAnnouncement)
if (component.AnnouncementText != null)
{
if (component.AnnouncementText != null)
_chat.DispatchGlobalAnnouncement(Loc.GetString(component.AnnouncementText), playSound: true, colorOverride: Color.Green);

if (component.AnnounceAudio != null)
Audio.PlayGlobal(component.AnnounceAudio, Filter.Broadcast(), true);
if (component.EnableAnnouncement)
_chat.DispatchGlobalAnnouncement(Loc.GetString(component.AnnouncementText), announcementSound: component.AnnounceAudio, playTts: true, colorOverride: Color.Green);
else
_chat.DispatchGlobalAnnouncement(Loc.GetString(component.AnnouncementText), playDefault: true, playTts: true, colorOverride: Color.Green);
}
component.TimerCancel = new CancellationToken();
}
Expand Down

0 comments on commit 68944f1

Please sign in to comment.