using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Sound.Components;
///
/// Repeatedly plays a sound with a randomized delay.
///
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class SpamEmitSoundComponent : BaseEmitSoundComponent
{
///
/// The time at which the next sound will play.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField, AutoNetworkedField]
public TimeSpan NextSound;
///
/// The minimum time in seconds between playing the sound.
///
[DataField]
public TimeSpan MinInterval = TimeSpan.FromSeconds(2);
///
/// The maximum time in seconds between playing the sound.
///
[DataField]
public TimeSpan MaxInterval = TimeSpan.FromSeconds(2);
// Always Pvs.
///
/// Content of a popup message to display whenever the sound plays.
///
[DataField]
public LocId? PopUp;
///
/// Whether the timer is currently running and sounds are being played.
/// Do not set this directly, use
///
[DataField, AutoNetworkedField]
[Access(typeof(SharedEmitSoundSystem))]
public bool Enabled = true;
}