24 lines
689 B
C#
24 lines
689 B
C#
using Robust.Shared.Audio;
|
|
|
|
namespace Content.Shared.Sound.Components;
|
|
|
|
/// <summary>
|
|
/// Base sound emitter which defines most of the data fields.
|
|
/// Accepts both single sounds and sound collections.
|
|
/// </summary>
|
|
public abstract partial class BaseEmitSoundComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The <see cref="SoundSpecifier"/> to play.
|
|
/// </summary>
|
|
[DataField(required: true), AutoNetworkedField]
|
|
public SoundSpecifier? Sound;
|
|
|
|
/// <summary>
|
|
/// Play the sound at the position instead of parented to the source entity.
|
|
/// Useful if the entity is deleted after.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool Positional;
|
|
}
|