Files
crystall-punk-14/Content.Shared/Weapons/Ranged/Components/FlyBySoundComponent.cs

29 lines
806 B
C#
Raw Permalink Normal View History

2022-05-21 18:04:47 +10:00
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Weapons.Ranged.Components;
2022-05-21 18:04:47 +10:00
/// <summary>
/// Plays a sound when its non-hard fixture collides with a player.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class FlyBySoundComponent : Component
2022-05-21 18:04:47 +10:00
{
/// <summary>
/// Probability that the sound plays
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("prob")]
2022-08-18 12:32:39 +10:00
public float Prob = 0.10f;
2022-05-21 18:04:47 +10:00
[ViewVariables(VVAccess.ReadWrite), DataField("sound")]
[AutoNetworkedField]
2022-05-21 18:04:47 +10:00
public SoundSpecifier Sound = new SoundCollectionSpecifier("BulletMiss")
{
2022-08-18 12:32:39 +10:00
Params = AudioParams.Default,
2022-05-21 18:04:47 +10:00
};
[DataField("range")]
[AutoNetworkedField]
public float Range = 1.5f;
2022-05-21 18:04:47 +10:00
}