using Content.Shared.DeviceLinking;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Anomaly.Components;
///
/// A device that allows you to translate anomaly activity into multitool signals.
///
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState, AutoGenerateComponentPause]
[Access(typeof(AnomalySynchronizerSystem))]
public sealed partial class AnomalySynchronizerComponent : Component
{
///
/// The uid of the anomaly to which the synchronizer is connected.
///
[DataField, AutoNetworkedField]
public EntityUid? ConnectedAnomaly;
///
/// Should the anomaly pulse when connected to the synchronizer?
///
[DataField, AutoNetworkedField]
public bool PulseOnConnect = true;
///
/// Should the anomaly pulse when disconnected from synchronizer?
///
[DataField, AutoNetworkedField]
public bool PulseOnDisconnect = false;
///
/// Minimum distance from the synchronizer to the anomaly to be attached.
///
[DataField, AutoNetworkedField]
public float AttachRange = 0.4f;
///
/// Periodically checks to see if the anomaly has moved to disconnect it.
///
[DataField, AutoNetworkedField]
public TimeSpan CheckFrequency = TimeSpan.FromSeconds(1f);
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoNetworkedField, AutoPausedField]
public TimeSpan NextCheckTime = TimeSpan.Zero;
[DataField]
public ProtoId DecayingPort = "Decaying";
[DataField]
public ProtoId StabilizePort = "Stabilize";
[DataField]
public ProtoId GrowingPort = "Growing";
[DataField]
public ProtoId PulsePort = "Pulse";
[DataField]
public ProtoId SupercritPort = "Supercritical";
[DataField]
public SoundSpecifier ConnectedSound = new SoundPathSpecifier("/Audio/Machines/anomaly_sync_connect.ogg");
[DataField]
public SoundSpecifier DisconnectedSound = new SoundPathSpecifier("/Audio/Machines/anomaly_sync_connect.ogg");
}