From 5ff1756cb5cbef504d78d3015797a06b0ef23f6b Mon Sep 17 00:00:00 2001 From: Aviu00 Date: Wed, 17 Jan 2024 12:48:23 +0300 Subject: [PATCH] Small fix --- Content.Server/White/Other/Speech/VoiceOfGodComponent.cs | 2 +- Content.Server/White/Other/Speech/VoiceOfGodSystem.cs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Content.Server/White/Other/Speech/VoiceOfGodComponent.cs b/Content.Server/White/Other/Speech/VoiceOfGodComponent.cs index dd0b622ccf..47175d5f7d 100644 --- a/Content.Server/White/Other/Speech/VoiceOfGodComponent.cs +++ b/Content.Server/White/Other/Speech/VoiceOfGodComponent.cs @@ -1,7 +1,7 @@ namespace Content.Server.White.Other.Speech; [RegisterComponent] -public sealed class VoiceOfGodComponent : Component +public sealed partial class VoiceOfGodComponent : Component { [DataField("sound"), ViewVariables(VVAccess.ReadWrite)] public string Sound { get; set; } = "/Audio/White/Voice/voice_of_god.ogg"; diff --git a/Content.Server/White/Other/Speech/VoiceOfGodSystem.cs b/Content.Server/White/Other/Speech/VoiceOfGodSystem.cs index eb16617475..22266ea871 100644 --- a/Content.Server/White/Other/Speech/VoiceOfGodSystem.cs +++ b/Content.Server/White/Other/Speech/VoiceOfGodSystem.cs @@ -1,4 +1,5 @@ using Content.Server.Speech; +using Robust.Server.Audio; using Robust.Shared.Audio; using Robust.Shared.Player; @@ -6,6 +7,7 @@ namespace Content.Server.White.Other.Speech; public sealed class VoiceOfGodSystem : EntitySystem { + [Dependency] private readonly AudioSystem _audio = default!; public override void Initialize() { base.Initialize(); @@ -17,8 +19,7 @@ public sealed class VoiceOfGodSystem : EntitySystem { if (!string.IsNullOrEmpty(component.Sound)) { - SoundSystem.Play(component.Sound, - Filter.Pvs(component.Owner, component.SoundRange), + _audio.PlayPvs(component.Sound, component.Owner, new AudioParams() {