tanks only produce noise with sufficient valve pressure (#22401)
This commit is contained in:
@@ -39,6 +39,7 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
|
|
||||||
private const float TimerDelay = 0.5f;
|
private const float TimerDelay = 0.5f;
|
||||||
private float _timer = 0f;
|
private float _timer = 0f;
|
||||||
|
private const float MinimumSoundValvePressure = 10.0f;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -178,7 +179,8 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
var strength = removed.TotalMoles * MathF.Sqrt(removed.Temperature);
|
var strength = removed.TotalMoles * MathF.Sqrt(removed.Temperature);
|
||||||
var dir = _random.NextAngle().ToWorldVec();
|
var dir = _random.NextAngle().ToWorldVec();
|
||||||
_throwing.TryThrow(gasTank, dir * strength, strength);
|
_throwing.TryThrow(gasTank, dir * strength, strength);
|
||||||
_audioSys.PlayPvs(gasTank.Comp.RuptureSound, gasTank);
|
if (gasTank.Comp.OutputPressure >= MinimumSoundValvePressure)
|
||||||
|
_audioSys.PlayPvs(gasTank.Comp.RuptureSound, gasTank);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ToggleInternals(Entity<GasTankComponent> ent)
|
private void ToggleInternals(Entity<GasTankComponent> ent)
|
||||||
|
|||||||
Reference in New Issue
Block a user