Files
OldThink/Content.Server/Sound/Components/BaseEmitSoundComponent.cs

24 lines
737 B
C#
Raw Normal View History

using Content.Shared.Sound;
using Robust.Shared.Audio;
2021-06-27 21:55:18 +02:00
namespace Content.Server.Sound.Components
{
/// <summary>
/// Base sound emitter which defines most of the data fields.
/// Accepts both single sounds and sound collections.
/// </summary>
public abstract class BaseEmitSoundComponent : Component
{
[ViewVariables(VVAccess.ReadWrite)]
[DataField("sound", required: true)]
public SoundSpecifier Sound { get; set; } = default!;
[DataField("audioParams")]
public AudioParams AudioParams = AudioParams.Default.WithVolume(-2f);
[ViewVariables(VVAccess.ReadWrite)]
[DataField("variation")]
public float PitchVariation { get; set; } = 0.0f;
}
}