Files
tbd-station-14/Content.Shared/Weapons/Ranged/Components/FlyBySoundComponent.cs
2022-07-29 12:13:12 +10:00

26 lines
746 B
C#

using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Weapons.Ranged.Components;
/// <summary>
/// Plays a sound when its non-hard fixture collides with a player.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed class FlyBySoundComponent : Component
{
/// <summary>
/// Probability that the sound plays
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("prob")]
public float Prob = 0.75f;
[ViewVariables(VVAccess.ReadWrite), DataField("sound")]
public SoundSpecifier Sound = new SoundCollectionSpecifier("BulletMiss")
{
Params = AudioParams.Default.WithVolume(5f),
};
[ViewVariables, DataField("range")] public float Range = 1.5f;
}