From 46f931a2e37b15d0f7ceff73fda44bdb342e7fbf Mon Sep 17 00:00:00 2001 From: pheenty Date: Mon, 21 Oct 2024 23:20:47 +0700 Subject: [PATCH] sound tweaks --- Content.Server/Stories/Nightvision/NightvisionSystem.cs | 4 ---- Content.Shared/Stories/Nightvision/NightvisionComponent.cs | 2 +- Content.Shared/Stories/Nightvision/SharedNightvisionSystem.cs | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Content.Server/Stories/Nightvision/NightvisionSystem.cs b/Content.Server/Stories/Nightvision/NightvisionSystem.cs index 8076fba08f..6a0ae66489 100644 --- a/Content.Server/Stories/Nightvision/NightvisionSystem.cs +++ b/Content.Server/Stories/Nightvision/NightvisionSystem.cs @@ -1,7 +1,6 @@ using Content.Shared.Actions; using Content.Shared.GameTicking; using Content.Shared.Inventory.Events; -using Robust.Shared.Audio.Systems; using Robust.Shared.Player; using Robust.Shared.Timing; using Content.Shared.Stories.Nightvision; @@ -12,7 +11,6 @@ public sealed class NightvisionSystem : EntitySystem { [Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly SharedActionsSystem _actions = default!; - [Dependency] private readonly SharedAudioSystem _audio = default!; public override void Initialize() { base.Initialize(); @@ -36,8 +34,6 @@ private void OnEquipped(EntityUid uid, NightvisionClothingComponent component, G } private void OnStartUp(EntityUid uid, NightvisionComponent component, ComponentStartup args) { - if (component.PlaySound) - _audio.PlayPvs(component.ToggleOnSound, uid); _actions.AddAction(uid, ref component.ToggleActionEntity, component.ToggleAction); } private void OnShutdown(EntityUid uid, NightvisionComponent component, ComponentShutdown args) diff --git a/Content.Shared/Stories/Nightvision/NightvisionComponent.cs b/Content.Shared/Stories/Nightvision/NightvisionComponent.cs index 53e896cf02..a323e2e7ab 100644 --- a/Content.Shared/Stories/Nightvision/NightvisionComponent.cs +++ b/Content.Shared/Stories/Nightvision/NightvisionComponent.cs @@ -10,7 +10,7 @@ namespace Content.Shared.Stories.Nightvision; public sealed partial class NightvisionComponent : Component { [ViewVariables(VVAccess.ReadWrite), DataField("enabled"), AutoNetworkedField] - public bool Enabled { get; set; } = true; + public bool Enabled { get; set; } = false; [DataField] public string ToggleAction = "ToggleNightvisionAction"; [DataField, AutoNetworkedField] diff --git a/Content.Shared/Stories/Nightvision/SharedNightvisionSystem.cs b/Content.Shared/Stories/Nightvision/SharedNightvisionSystem.cs index f081323d70..1db31d3317 100644 --- a/Content.Shared/Stories/Nightvision/SharedNightvisionSystem.cs +++ b/Content.Shared/Stories/Nightvision/SharedNightvisionSystem.cs @@ -17,6 +17,6 @@ private void OnToggle(EntityUid uid, NightvisionComponent component, ToggleNight return; component.Enabled = !component.Enabled; if (component.Enabled && component.PlaySound) - _audio.PlayPredicted(component.ToggleOnSound, uid, uid); + _audio.PlayLocal(component.ToggleOnSound, uid, uid); } }