using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; using Content.Server.Explosion.EntitySystems; namespace Content.Server.Explosion.Components; /// /// A component that electrocutes an entity having this component when a trigger is triggered. /// [RegisterComponent, AutoGenerateComponentPause] [Access(typeof(TriggerSystem))] public sealed partial class ShockOnTriggerComponent : Component { /// /// The force of an electric shock when the trigger is triggered. /// [DataField] public int Damage = 5; /// /// Duration of electric shock when the trigger is triggered. /// [DataField] public TimeSpan Duration = TimeSpan.FromSeconds(2); /// /// The minimum delay between repeating triggers. /// [DataField] public TimeSpan Cooldown = TimeSpan.FromSeconds(4); /// /// When can the trigger run again? /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoPausedField] public TimeSpan NextTrigger = TimeSpan.Zero; }