diff --git a/Content.Server/StationEvents/Events/DiseaseOutbreak.cs b/Content.Server/StationEvents/Events/DiseaseOutbreak.cs index 684a3324576..67bae1a03f4 100644 --- a/Content.Server/StationEvents/Events/DiseaseOutbreak.cs +++ b/Content.Server/StationEvents/Events/DiseaseOutbreak.cs @@ -4,6 +4,7 @@ using Content.Server.Disease; using Content.Shared.Disease; using Content.Shared.MobState.Components; +using Content.Shared.Sound; using Robust.Shared.Random; using Robust.Shared.Prototypes; @@ -32,7 +33,7 @@ public sealed class DiseaseOutbreak : StationEvent public override string Name => "DiseaseOutbreak"; public override float Weight => WeightNormal; - public override string? StartAudio => "/Audio/Announcements/outbreak7.ogg"; + public override SoundSpecifier? StartAudio => new SoundPathSpecifier("/Audio/Announcements/outbreak7.ogg"); protected override float EndAfter => 1.0f; /// /// Finds 2-5 random, alive entities that can host diseases diff --git a/Content.Server/StationEvents/Events/GasLeak.cs b/Content.Server/StationEvents/Events/GasLeak.cs index 9b2ff8c0fa8..1b3881f3bf1 100644 --- a/Content.Server/StationEvents/Events/GasLeak.cs +++ b/Content.Server/StationEvents/Events/GasLeak.cs @@ -1,5 +1,6 @@ using Content.Server.Atmos.EntitySystems; using Content.Shared.Atmos; +using Content.Shared.Sound; using Content.Shared.Station; using Robust.Shared.Audio; using Robust.Shared.GameObjects; diff --git a/Content.Server/StationEvents/Events/KudzuGrowth.cs b/Content.Server/StationEvents/Events/KudzuGrowth.cs index 4d6f1627d1c..303d1a86511 100644 --- a/Content.Server/StationEvents/Events/KudzuGrowth.cs +++ b/Content.Server/StationEvents/Events/KudzuGrowth.cs @@ -1,9 +1,5 @@ -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Localization; -using Robust.Shared.Log; +using Content.Shared.Sound; using Robust.Shared.Map; -using Robust.Shared.Maths; using Robust.Shared.Random; namespace Content.Server.StationEvents.Events; diff --git a/Content.Server/StationEvents/Events/MeteorSwarm.cs b/Content.Server/StationEvents/Events/MeteorSwarm.cs index 43fc39b3676..279c66d522e 100644 --- a/Content.Server/StationEvents/Events/MeteorSwarm.cs +++ b/Content.Server/StationEvents/Events/MeteorSwarm.cs @@ -2,6 +2,7 @@ using System.Linq; using Content.Server.GameTicking; using Content.Server.Projectiles.Components; +using Content.Shared.Sound; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Map; @@ -27,7 +28,7 @@ public sealed class MeteorSwarm : StationEvent public override string StartAnnouncement => Loc.GetString("station-event-meteor-swarm-start-announcement"); protected override string EndAnnouncement => Loc.GetString("station-event-meteor-swarm-ebd-announcement"); - public override string? StartAudio => "/Audio/Announcements/meteors.ogg"; + public override SoundSpecifier? StartAudio => new SoundPathSpecifier("/Audio/Announcements/meteors.ogg"); protected override float StartAfter => 30f; protected override float EndAfter => float.MaxValue; diff --git a/Content.Server/StationEvents/Events/PowerGridCheck.cs b/Content.Server/StationEvents/Events/PowerGridCheck.cs index 178882d89ed..25c8445105d 100644 --- a/Content.Server/StationEvents/Events/PowerGridCheck.cs +++ b/Content.Server/StationEvents/Events/PowerGridCheck.cs @@ -1,5 +1,6 @@ using System.Threading; using Content.Server.Power.Components; +using Content.Shared.Sound; using JetBrains.Annotations; using Robust.Shared.Audio; using Robust.Shared.Player; @@ -20,7 +21,7 @@ public sealed class PowerGridCheck : StationEvent public override int? MaxOccurrences => 3; public override string StartAnnouncement => Loc.GetString("station-event-power-grid-check-start-announcement"); protected override string EndAnnouncement => Loc.GetString("station-event-power-grid-check-end-announcement"); - public override string? StartAudio => "/Audio/Announcements/power_off.ogg"; + public override SoundSpecifier? StartAudio => new SoundPathSpecifier("/Audio/Announcements/power_off.ogg"); // If you need EndAudio it's down below. Not set here because we can't play it at the normal time without spamming sounds. diff --git a/Content.Server/StationEvents/Events/RadiationStorm.cs b/Content.Server/StationEvents/Events/RadiationStorm.cs index 3278bec24ff..3bc0058e336 100644 --- a/Content.Server/StationEvents/Events/RadiationStorm.cs +++ b/Content.Server/StationEvents/Events/RadiationStorm.cs @@ -2,6 +2,7 @@ using Content.Server.Radiation; using Content.Server.Station; using Content.Shared.Coordinates; +using Content.Shared.Sound; using Content.Shared.Station; using JetBrains.Annotations; using Robust.Shared.GameObjects; @@ -24,7 +25,7 @@ public sealed class RadiationStorm : StationEvent public override string Name => "RadiationStorm"; public override string StartAnnouncement => Loc.GetString("station-event-radiation-storm-start-announcement"); protected override string EndAnnouncement => Loc.GetString("station-event-radiation-storm-end-announcement"); - public override string StartAudio => "/Audio/Announcements/radiation.ogg"; + public override SoundSpecifier? StartAudio => new SoundPathSpecifier("/Audio/Announcements/radiation.ogg"); protected override float StartAfter => 10.0f; // Event specific details diff --git a/Content.Server/StationEvents/Events/StationEvent.cs b/Content.Server/StationEvents/Events/StationEvent.cs index 7c14e9c7271..53d6b71bb53 100644 --- a/Content.Server/StationEvents/Events/StationEvent.cs +++ b/Content.Server/StationEvents/Events/StationEvent.cs @@ -4,6 +4,7 @@ using Content.Server.Chat.Managers; using Content.Server.Station; using Content.Shared.Database; +using Content.Shared.Sound; using Content.Shared.Station; using Robust.Shared.Audio; using Robust.Shared.GameObjects; @@ -51,12 +52,12 @@ public abstract class StationEvent /// /// Starting audio of the event. /// - public virtual string? StartAudio { get; set; } = null; + public virtual SoundSpecifier? StartAudio { get; set; } = new SoundPathSpecifier("/Audio/Announcements/attention.ogg"); /// /// Ending audio of the event. /// - public virtual string? EndAudio { get; } = null; + public virtual SoundSpecifier? EndAudio { get; } = null; public virtual AudioParams AudioParams { get; } = AudioParams.Default.WithVolume(-10f); @@ -137,7 +138,7 @@ public virtual void Announce() if (StartAudio != null) { - SoundSystem.Play(Filter.Broadcast(), StartAudio, AudioParams); + SoundSystem.Play(Filter.Broadcast(), StartAudio.GetSound(), AudioParams); } Announced = true; @@ -160,7 +161,7 @@ public virtual void Shutdown() if (EndAudio != null) { - SoundSystem.Play(Filter.Broadcast(), EndAudio, AudioParams); + SoundSystem.Play(Filter.Broadcast(), EndAudio.GetSound(), AudioParams); } Started = false; diff --git a/Content.Server/StationEvents/Events/VentCritters.cs b/Content.Server/StationEvents/Events/VentCritters.cs index 8e8dea0cd99..fa288f78204 100644 --- a/Content.Server/StationEvents/Events/VentCritters.cs +++ b/Content.Server/StationEvents/Events/VentCritters.cs @@ -1,5 +1,6 @@ using System.Linq; using Content.Server.StationEvents.Components; +using Content.Shared.Sound; using Robust.Shared.Random; namespace Content.Server.StationEvents.Events; @@ -17,7 +18,7 @@ public sealed class VentCritters : StationEvent public override string? StartAnnouncement => Loc.GetString("station-event-vent-spiders-start-announcement", ("data", Loc.GetString(Loc.GetString($"random-sentience-event-data-{_random.Next(1, 6)}")))); - public override string? StartAudio => "/Audio/Announcements/aliens.ogg"; + public override SoundSpecifier? StartAudio => new SoundPathSpecifier("/Audio/Announcements/aliens.ogg"); public override int EarliestStart => 15; diff --git a/Content.Server/StationEvents/Events/ZombieOutbreak.cs b/Content.Server/StationEvents/Events/ZombieOutbreak.cs index 17cf0f328e7..c6a4509c98a 100644 --- a/Content.Server/StationEvents/Events/ZombieOutbreak.cs +++ b/Content.Server/StationEvents/Events/ZombieOutbreak.cs @@ -2,6 +2,7 @@ using Content.Server.Chat.Managers; using Content.Server.Disease.Zombie.Components; using Content.Shared.MobState.Components; +using Content.Shared.Sound; namespace Content.Server.StationEvents.Events { @@ -18,7 +19,7 @@ public sealed class ZombieOutbreak : StationEvent public override int EarliestStart => 50; public override float Weight => WeightLow / 2; - public override string? StartAudio => "/Audio/Announcements/bloblarm.ogg"; + public override SoundSpecifier? StartAudio => new SoundPathSpecifier("/Audio/Announcements/bloblarm.ogg"); protected override float EndAfter => 1.0f; public override int? MaxOccurrences => 1; diff --git a/Resources/Audio/Announcements/attention.ogg b/Resources/Audio/Announcements/attention.ogg new file mode 100644 index 00000000000..912be4425eb Binary files /dev/null and b/Resources/Audio/Announcements/attention.ogg differ diff --git a/Resources/Audio/Announcements/license.txt b/Resources/Audio/Announcements/license.txt index 60d94c5a077..08e00462d38 100644 --- a/Resources/Audio/Announcements/license.txt +++ b/Resources/Audio/Announcements/license.txt @@ -1,3 +1,5 @@ -outbreak7.ogg taken from /tg/station at commit https://github.com/tgstation/tgstation/commit/40d89d11ea4a5cb81d61dc1018b46f4e7d32c62a used under CC-BY-SA-3.0 -meteors.ogg taken from https://github.com/tgstation/tgstation/blob/95731342b97167d7883ff091d389f79c36442ee6/sound/ai/default/meteors.ogg used under CC-BY-SA-3.0 aliens.ogg taken from https://github.com/tgstation/tgstation/blob/95731342b97167d7883ff091d389f79c36442ee6/sound/ai/default/aliens.ogg used under CC-BY-SA-3.0 +attention.ogg taken from /tg/station at commit https://github.com/tgstation/tgstation/commit/40d89d11ea4a5cb81d61dc1018b46f4e7d32c62a used under CC-BY-SA-3.0 +meteors.ogg taken from https://github.com/tgstation/tgstation/blob/95731342b97167d7883ff091d389f79c36442ee6/sound/ai/default/meteors.ogg used under CC-BY-SA-3.0 +outbreak7.ogg taken from /tg/station at commit https://github.com/tgstation/tgstation/commit/40d89d11ea4a5cb81d61dc1018b46f4e7d32c62a used under CC-BY-SA-3.0 + diff --git a/Resources/Audio/Items/license.txt b/Resources/Audio/Items/license.txt index e68584bde44..d23148322ca 100644 --- a/Resources/Audio/Items/license.txt +++ b/Resources/Audio/Items/license.txt @@ -1,2 +1,2 @@ -pill.ogg contains audio from '437480__ruanza__swallowing.wav' by user RuanZA, used under CC BY-NC 3.0 (https://freesound.org/people/RuanZA/sounds/437480/), as well as part of '330657__diniunicorn__popping-pills.wav' by user diniunicorn, used under CC0 1.0 (https://freesound.org/people/diniunicorn/sounds/330657/). ring.ogg used udner CC-BY-SA-3.0, taken from /tg/station commit https://github.com/tgstation/tgstation/commit/c61c452d78425d89920b41ed5f95fd190e733a3c. +pill.ogg contains audio from '437480__ruanza__swallowing.wav' by user RuanZA, used under CC BY-NC 3.0 (https://freesound.org/people/RuanZA/sounds/437480/), as well as part of '330657__diniunicorn__popping-pills.wav' by user diniunicorn, used under CC0 1.0 (https://freesound.org/people/diniunicorn/sounds/330657/). ring.ogg used under CC-BY-SA-3.0, taken from /tg/station commit https://github.com/tgstation/tgstation/commit/c61c452d78425d89920b41ed5f95fd190e733a3c.