Unrevert audio (#21330)

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
This commit is contained in:
metalgearsloth
2023-11-27 22:12:34 +11:00
committed by GitHub
parent d3486d3b25
commit 269c93245d
288 changed files with 848 additions and 427 deletions

View File

@@ -5,6 +5,9 @@ using Content.Shared.Storage.Components;
using Robust.Shared.Audio;
using Robust.Shared.Player;
using Robust.Shared.Random;
using System.Linq;
using Content.Shared.Storage.Components;
using Robust.Shared.Audio.Systems;
namespace Content.Server.Storage.EntitySystems;
@@ -12,6 +15,7 @@ public sealed class CursedEntityStorageSystem : EntitySystem
{
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly EntityStorageSystem _entityStorage = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
public override void Initialize()
{
@@ -47,6 +51,7 @@ public sealed class CursedEntityStorageSystem : EntitySystem
storage.Contents.Remove(entity);
_entityStorage.AddToContents(entity, lockerEnt);
}
SoundSystem.Play(component.CursedSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.125f, _random));
_audio.PlayPvs(component.CursedSound, uid, AudioHelpers.WithVariation(0.125f, _random));
}
}