using Robust.Shared.Audio; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Server.Pinpointer; /// /// This is used for an item that beeps based on /// proximity to a specified component. /// [RegisterComponent, Access(typeof(ProximityBeeperSystem))] public sealed class ProximityBeeperComponent : Component { /// /// Whether or not it's on. /// [DataField("enabled")] public bool Enabled; /// /// The target component that is being searched for /// [DataField("component", required: true), ViewVariables(VVAccess.ReadWrite)] public string Component = default!; /// /// The farthest distance a target can be for the beep to occur /// [DataField("maximumDistance"), ViewVariables(VVAccess.ReadWrite)] public float MaximumDistance = 10f; /// /// The maximum interval between beeps. /// [DataField("maxBeepInterval"), ViewVariables(VVAccess.ReadWrite)] public TimeSpan MaxBeepInterval = TimeSpan.FromSeconds(1.5f); /// /// The minimum interval between beeps. /// [DataField("minBeepInterval"), ViewVariables(VVAccess.ReadWrite)] public TimeSpan MinBeepInterval = TimeSpan.FromSeconds(0.25f); /// /// When the next beep will occur /// [DataField("nextBeepTime", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)] public TimeSpan NextBeepTime; /// /// The sound played when the locator beeps. /// [DataField("beepSound")] public SoundSpecifier? BeepSound; }