using Content.Shared.CCVar; using Robust.Shared.Audio; using Robust.Shared.Serialization; namespace Content.Shared.Audio; /// /// Handles playing audio to all players globally unless disabled by cvar. Some events are grid-specific. /// public abstract class SharedGlobalSoundSystem : EntitySystem { } [Virtual] [Serializable, NetSerializable] public class GlobalSoundEvent : EntityEventArgs { public string Filename; public AudioParams? AudioParams; public GlobalSoundEvent(string filename, AudioParams? audioParams = null) { Filename = filename; AudioParams = audioParams; } } /// /// Intended for admin music. Can be disabled by the cvar. /// [Serializable, NetSerializable] public sealed class AdminSoundEvent : GlobalSoundEvent { public AdminSoundEvent(string filename, AudioParams? audioParams = null) : base(filename, audioParams){} } /// /// Intended for misc sound effects. Can't be disabled by cvar. /// [Serializable, NetSerializable] public sealed class GameGlobalSoundEvent : GlobalSoundEvent { public GameGlobalSoundEvent(string filename, AudioParams? audioParams = null) : base(filename, audioParams){} } public enum StationEventMusicType : byte { Nuke } /// /// Intended for music triggered by events on a specific station. Can be disabled by the cvar. /// [Serializable, NetSerializable] public sealed class StationEventMusicEvent : GlobalSoundEvent { public StationEventMusicType Type; public StationEventMusicEvent(string filename, StationEventMusicType type, AudioParams? audioParams = null) : base( filename, audioParams) { Type = type; } } /// /// Attempts to stop a playing stream. /// [Serializable, NetSerializable] public sealed class StopStationEventMusic : EntityEventArgs { public StationEventMusicType Type; public StopStationEventMusic(StationEventMusicType type) { Type = type; } }