Adds sound to fire extinguisher safety (#4494)

This commit is contained in:
Swept
2021-08-19 22:37:16 -07:00
committed by GitHub
parent 39571697a5
commit 8df0766e8d
2 changed files with 64 additions and 59 deletions

View File

@@ -79,6 +79,9 @@ namespace Content.Server.Fluids.Components
[DataField("spraySound", required: true)]
public SoundSpecifier SpraySound { get; } = default!;
[DataField("safetySound")]
public SoundSpecifier SafetySound { get; } = new SoundPathSpecifier("/Audio/Machines/button.ogg");
public ReagentUnit CurrentVolume => Owner.GetComponentOrNull<SolutionContainerComponent>()?.CurrentVolume ?? ReagentUnit.Zero;
protected override void Initialize()
@@ -200,6 +203,7 @@ namespace Content.Server.Fluids.Components
private void ToggleSafety(IEntity user)
{
SoundSystem.Play(Filter.Pvs(Owner), SafetySound.GetSound(), Owner, AudioHelpers.WithVariation(0.125f).WithVolume(-4f));
SetSafety(user, !_safety);
}