Small fix

This commit is contained in:
Aviu00
2024-01-17 12:48:23 +03:00
parent 44ad721a3a
commit 5ff1756cb5
2 changed files with 4 additions and 3 deletions

View File

@@ -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";

View File

@@ -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()
{