Don't show Station Event announcements to players in the lobby. (#30886)

This commit is contained in:
Mervill
2024-08-11 09:09:33 +03:00
committed by Spatison
parent 1e1b7fa468
commit e6fa747f95
27 changed files with 141 additions and 121 deletions

View File

@@ -161,10 +161,11 @@ public sealed class AlertLevelSystem : EntitySystem
announcement = locAnnouncement;
var alert = $"alert{char.ToUpperInvariant(level[0]) + level[1..]}";
var filter = _stationSystem.GetInOwningStation(station);
if (playSound)
_announcer.SendAnnouncementAudio(alert, _stationSystem.GetInOwningStation(station));
_announcer.SendAnnouncementAudio(alert, filter);
if (announce)
_announcer.SendAnnouncementMessage(alert, "alert-level-announcement", null, detail.Color, null, null,
_announcer.SendAnnouncementMessage(alert, "alert-level-announcement", null, filter, detail.Color, null, null,
("name", name), ("announcement", announcement));
RaiseLocalEvent(new AlertLevelChangedEvent(station, level));