using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Emp;
///
/// While entity has this component it is "disabled" by EMP.
/// Add desired behaviour in other systems.
///
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState, AutoGenerateComponentPause]
[Access(typeof(SharedEmpSystem))]
public sealed partial class EmpDisabledComponent : Component
{
///
/// Moment of time when the component is removed and entity stops being "disabled".
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoNetworkedField, AutoPausedField]
public TimeSpan DisabledUntil = TimeSpan.Zero;
///
/// Default time between visual effect spawns.
/// This gets a random multiplier.
///
[DataField, AutoNetworkedField]
public TimeSpan EffectCooldown = TimeSpan.FromSeconds(3);
///
/// When next effect will be spawned.
/// TODO: Particle system.
///
[AutoPausedField]
public TimeSpan TargetTime = TimeSpan.Zero;
}