Don't show the Meteor Swarm announcement to players in the lobby. (#30922)
This commit is contained in:
@@ -28,9 +28,13 @@ public sealed class MeteorSwarmSystem : GameRuleSystem<MeteorSwarmComponent>
|
||||
|
||||
component.WaveCounter = component.Waves.Next(RobustRandom);
|
||||
|
||||
// we don't want to send to players who aren't in game (i.e. in the lobby)
|
||||
Filter allPlayersInGame = Filter.Empty().AddWhere(GameTicker.UserHasJoinedGame);
|
||||
|
||||
if (component.Announcement is { } locId)
|
||||
_chat.DispatchGlobalAnnouncement(Loc.GetString(locId), playSound: false, colorOverride: Color.Gold);
|
||||
_audio.PlayGlobal(component.AnnouncementSound, Filter.Broadcast(), true);
|
||||
_chat.DispatchFilteredAnnouncement(allPlayersInGame, Loc.GetString(locId), playSound: false, colorOverride: Color.Gold);
|
||||
|
||||
_audio.PlayGlobal(component.AnnouncementSound, allPlayersInGame, true);
|
||||
}
|
||||
|
||||
protected override void ActiveTick(EntityUid uid, MeteorSwarmComponent component, GameRuleComponent gameRule, float frameTime)
|
||||
|
||||
@@ -22,7 +22,6 @@ public abstract class StationEventSystem<T> : GameRuleSystem<T> where T : ICompo
|
||||
[Dependency] protected readonly ChatSystem ChatSystem = default!;
|
||||
[Dependency] protected readonly SharedAudioSystem Audio = default!;
|
||||
[Dependency] protected readonly StationSystem StationSystem = default!;
|
||||
[Dependency] protected readonly GameTicker GameTicker = default!;
|
||||
|
||||
protected ISawmill Sawmill = default!;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user