2022-03-25 17:17:29 +13:00
|
|
|
using Robust.Shared.Audio;
|
2021-06-19 11:35:56 +02:00
|
|
|
|
2024-06-24 19:55:28 +10:00
|
|
|
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
|
2021-06-19 11:35:56 +02:00
|
|
|
{
|
2025-03-30 15:41:11 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// The <see cref="SoundSpecifier"/> to play.
|
|
|
|
|
/// </summary>
|
2025-07-22 12:25:28 +02:00
|
|
|
[DataField(required: true), AutoNetworkedField]
|
2024-06-24 19:55:28 +10:00
|
|
|
public SoundSpecifier? Sound;
|
2024-12-16 12:23:14 +00:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Play the sound at the position instead of parented to the source entity.
|
|
|
|
|
/// Useful if the entity is deleted after.
|
|
|
|
|
/// </summary>
|
2025-07-22 12:25:28 +02:00
|
|
|
[DataField, AutoNetworkedField]
|
2024-12-16 12:23:14 +00:00
|
|
|
public bool Positional;
|
2021-06-19 11:35:56 +02:00
|
|
|
}
|