Small fix
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
namespace Content.Server.White.Other.Speech;
|
namespace Content.Server.White.Other.Speech;
|
||||||
|
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
public sealed class VoiceOfGodComponent : Component
|
public sealed partial class VoiceOfGodComponent : Component
|
||||||
{
|
{
|
||||||
[DataField("sound"), ViewVariables(VVAccess.ReadWrite)]
|
[DataField("sound"), ViewVariables(VVAccess.ReadWrite)]
|
||||||
public string Sound { get; set; } = "/Audio/White/Voice/voice_of_god.ogg";
|
public string Sound { get; set; } = "/Audio/White/Voice/voice_of_god.ogg";
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Content.Server.Speech;
|
using Content.Server.Speech;
|
||||||
|
using Robust.Server.Audio;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
@@ -6,6 +7,7 @@ namespace Content.Server.White.Other.Speech;
|
|||||||
|
|
||||||
public sealed class VoiceOfGodSystem : EntitySystem
|
public sealed class VoiceOfGodSystem : EntitySystem
|
||||||
{
|
{
|
||||||
|
[Dependency] private readonly AudioSystem _audio = default!;
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
@@ -17,8 +19,7 @@ public sealed class VoiceOfGodSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(component.Sound))
|
if (!string.IsNullOrEmpty(component.Sound))
|
||||||
{
|
{
|
||||||
SoundSystem.Play(component.Sound,
|
_audio.PlayPvs(component.Sound,
|
||||||
Filter.Pvs(component.Owner, component.SoundRange),
|
|
||||||
component.Owner,
|
component.Owner,
|
||||||
new AudioParams()
|
new AudioParams()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user