Add SignalSwitch sound (#9013)
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
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
|
||||
BIN
Resources/Audio/Machines/lightswitch.ogg
Normal file
BIN
Resources/Audio/Machines/lightswitch.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user