Content audio (#20862)
This commit is contained in:
@@ -3,6 +3,7 @@ using Content.Server.Chat.Systems;
|
||||
using Content.Server.Station.Systems;
|
||||
using Content.Shared.CCVar;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
@@ -10,10 +11,11 @@ namespace Content.Server.AlertLevel;
|
||||
|
||||
public sealed class AlertLevelSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly ChatSystem _chatSystem = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly StationSystem _stationSystem = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
|
||||
// Until stations are a prototype, this is how it's going to have to be.
|
||||
public const string DefaultAlertLevelSet = "stationAlerts";
|
||||
@@ -174,7 +176,7 @@ public sealed class AlertLevelSystem : EntitySystem
|
||||
if (detail.Sound != null)
|
||||
{
|
||||
var filter = _stationSystem.GetInOwningStation(station);
|
||||
SoundSystem.Play(detail.Sound.GetSound(), filter, detail.Sound.Params);
|
||||
_audio.PlayGlobal(detail.Sound.GetSound(), filter, true, detail.Sound.Params);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user