diff --git a/Content.Server/Salvage/Expeditions/SalvageExpeditionComponent.cs b/Content.Server/Salvage/Expeditions/SalvageExpeditionComponent.cs index 2bc00397bc..3739d6e2b7 100644 --- a/Content.Server/Salvage/Expeditions/SalvageExpeditionComponent.cs +++ b/Content.Server/Salvage/Expeditions/SalvageExpeditionComponent.cs @@ -4,6 +4,7 @@ using Robust.Shared.Audio; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Server.Salvage.Expeditions; @@ -44,9 +45,6 @@ public sealed partial class SalvageExpeditionComponent : SharedSalvageExpedition /// /// Sound that plays when the mission end is imminent. /// - [ViewVariables(VVAccess.ReadWrite), DataField("sound")] - public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Misc/tension_session.ogg") - { - Params = AudioParams.Default.WithVolume(-5), - }; + [ViewVariables(VVAccess.ReadWrite), DataField("sound", customTypeSerializer: typeof(PrototypeIdSerializer))] // Parkstation-ExpeditionMusic + public string Sound = "ExpeditionCountdownDefault"; // Parkstation-ExpeditionMusic } diff --git a/Content.Server/Salvage/SalvageSystem.Runner.cs b/Content.Server/Salvage/SalvageSystem.Runner.cs index 0863362131..5fe2e62bcb 100644 --- a/Content.Server/Salvage/SalvageSystem.Runner.cs +++ b/Content.Server/Salvage/SalvageSystem.Runner.cs @@ -10,8 +10,10 @@ using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Salvage.Expeditions; +using Robust.Shared.Audio; using Robust.Shared.Map.Components; using Robust.Shared.Player; +using Robust.Shared.Random; using Robust.Shared.Utility; namespace Content.Server.Salvage; @@ -153,7 +155,11 @@ private void UpdateRunner() else if (comp.Stage < ExpeditionStage.MusicCountdown && remaining < TimeSpan.FromMinutes(2)) { // TODO: Some way to play audio attached to a map for players. - comp.Stream = _audio.PlayGlobal(comp.Sound, Filter.BroadcastMap(Comp(uid).MapId), true); + // Parkstation-ExpeditionMusic Start + if (_prototypeManager.TryIndex(comp.Sound, out var sound)) + comp.Stream = _audio.PlayGlobal(new SoundPathSpecifier(_random.Pick(sound.PickFiles), AudioParams.Default.WithVolume(-6)), + Filter.BroadcastMap(Comp(uid).MapId), true); + // Parkstation-ExpeditionMusic End comp.Stage = ExpeditionStage.MusicCountdown; Dirty(uid, comp); Announce(uid, Loc.GetString("salvage-expedition-announcement-countdown-minutes", ("duration", TimeSpan.FromMinutes(2).Minutes))); diff --git a/Resources/Audio/SimpleStation14/Music/attributions.yml b/Resources/Audio/SimpleStation14/Music/attributions.yml new file mode 100644 index 0000000000..c1ed2f1027 --- /dev/null +++ b/Resources/Audio/SimpleStation14/Music/attributions.yml @@ -0,0 +1,4 @@ +- files: ["deadling.ogg"] + license: "CC-BY-3.0" + copyright: "Created by Bolgarich" + source: "https://youtu.be/q7_NFEeeEac" diff --git a/Resources/Audio/SimpleStation14/Music/deadline.ogg b/Resources/Audio/SimpleStation14/Music/deadline.ogg new file mode 100644 index 0000000000..6ab081fc23 Binary files /dev/null and b/Resources/Audio/SimpleStation14/Music/deadline.ogg differ diff --git a/Resources/Prototypes/SimpleStation14/SoundCollections/Music/events.yml b/Resources/Prototypes/SimpleStation14/SoundCollections/Music/events.yml new file mode 100644 index 0000000000..83f0488d18 --- /dev/null +++ b/Resources/Prototypes/SimpleStation14/SoundCollections/Music/events.yml @@ -0,0 +1,5 @@ +- type: soundCollection + id: ExpeditionCountdownDefault + files: + - /Audio/Misc/tension_session.ogg + - /Audio/SimpleStation14/Music/deadline.ogg