diff --git a/Content.Server/MachineLinking/Components/SignalSwitchComponent.cs b/Content.Server/MachineLinking/Components/SignalSwitchComponent.cs index ec79d083eb..5a00df5b7e 100644 --- a/Content.Server/MachineLinking/Components/SignalSwitchComponent.cs +++ b/Content.Server/MachineLinking/Components/SignalSwitchComponent.cs @@ -1,4 +1,5 @@ using Content.Shared.MachineLinking; +using Content.Shared.Sound; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.MachineLinking.Components @@ -24,5 +25,8 @@ namespace Content.Server.MachineLinking.Components [DataField("state")] public bool State; + + [DataField("clickSound")] + public SoundSpecifier ClickSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/lightswitch.ogg"); } } diff --git a/Content.Server/MachineLinking/System/SignalSwitchSystem.cs b/Content.Server/MachineLinking/System/SignalSwitchSystem.cs index b254bd2f2c..78a0ef2ca4 100644 --- a/Content.Server/MachineLinking/System/SignalSwitchSystem.cs +++ b/Content.Server/MachineLinking/System/SignalSwitchSystem.cs @@ -1,5 +1,8 @@ using Content.Server.MachineLinking.Components; +using Content.Shared.Audio; using Content.Shared.Interaction; +using Robust.Shared.Audio; +using Robust.Shared.Player; namespace Content.Server.MachineLinking.System { @@ -27,6 +30,8 @@ namespace Content.Server.MachineLinking.System component.State = !component.State; _signalSystem.InvokePort(uid, component.State ? component.OnPort : component.OffPort); + SoundSystem.Play(component.ClickSound.GetSound(), Filter.Pvs(component.Owner), component.Owner, + AudioHelpers.WithVariation(0.125f).WithVolume(8f)); args.Handled = true; } diff --git a/Resources/Audio/Machines/license.txt b/Resources/Audio/Machines/license.txt index f3447aaeba..966e6d9569 100644 --- a/Resources/Audio/Machines/license.txt +++ b/Resources/Audio/Machines/license.txt @@ -8,4 +8,6 @@ uniformprinter.ogg taken from https://freesound.org/people/sukaton/sounds/60640/ vaccinator_running.ogg taken from https://freesound.org/people/RutgerMuller/sounds/365413/ and edited -vending_jingle.ogg made by github.com/hubismal licensed under CC-BY-3.0 \ No newline at end of file +vending_jingle.ogg made by github.com/hubismal licensed under CC-BY-3.0 + +lightswitch.ogg taken from https://github.com/Skyrat-SS13/Skyrat-tg/blob/3f6099bbc3c2afdc609bf1991c2f06297a0f13c2/modular_skyrat/modules/aesthetics/lightswitch/sound/lightswitch.ogg under CC-BY-SA 3.0 \ No newline at end of file diff --git a/Resources/Audio/Machines/lightswitch.ogg b/Resources/Audio/Machines/lightswitch.ogg new file mode 100644 index 0000000000..4cf5f36330 Binary files /dev/null and b/Resources/Audio/Machines/lightswitch.ogg differ