using Robust.Shared.GameStates; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Shared.Sound.Components; [RegisterComponent, NetworkedComponent, AutoGenerateComponentPause, AutoGenerateComponentState] public sealed partial class EmitSoundOnCollideComponent : BaseEmitSoundComponent { public static readonly TimeSpan CollideCooldown = TimeSpan.FromSeconds(0.2); /// /// Minimum velocity required for the sound to play. /// [DataField("minVelocity")] public float MinimumVelocity = 3f; /// /// To avoid sound spam add a cooldown to it. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] public TimeSpan NextSound; }