Adds sound to fire extinguisher safety (#4494)
This commit is contained in:
@@ -79,6 +79,9 @@ namespace Content.Server.Fluids.Components
|
|||||||
[DataField("spraySound", required: true)]
|
[DataField("spraySound", required: true)]
|
||||||
public SoundSpecifier SpraySound { get; } = default!;
|
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;
|
public ReagentUnit CurrentVolume => Owner.GetComponentOrNull<SolutionContainerComponent>()?.CurrentVolume ?? ReagentUnit.Zero;
|
||||||
|
|
||||||
protected override void Initialize()
|
protected override void Initialize()
|
||||||
@@ -200,6 +203,7 @@ namespace Content.Server.Fluids.Components
|
|||||||
|
|
||||||
private void ToggleSafety(IEntity user)
|
private void ToggleSafety(IEntity user)
|
||||||
{
|
{
|
||||||
|
SoundSystem.Play(Filter.Pvs(Owner), SafetySound.GetSound(), Owner, AudioHelpers.WithVariation(0.125f).WithVolume(-4f));
|
||||||
SetSafety(user, !_safety);
|
SetSafety(user, !_safety);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
description: It extinguishes fires.
|
description: It extinguishes fires.
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
|
netsync: false
|
||||||
sprite: Objects/Misc/fire_extinguisher.rsi
|
sprite: Objects/Misc/fire_extinguisher.rsi
|
||||||
layers:
|
layers:
|
||||||
- state: fire_extinguisher_closed
|
- state: fire_extinguisher_closed
|
||||||
|
|||||||
Reference in New Issue
Block a user