using Content.Shared.Mobs; using Content.Shared.FixedPoint; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; using Robust.Shared.GameStates; namespace Content.Shared.Damage.Components; /// /// Passively damages the entity on a specified interval. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause] public sealed partial class PassiveDamageComponent : Component { /// /// The entitys' states that passive damage will apply in /// [DataField, AutoNetworkedField] public List AllowedStates = new(); /// /// Damage / Healing per interval dealt to the entity every interval /// [DataField, AutoNetworkedField] public DamageSpecifier Damage = new(); /// /// Delay between damage events in seconds /// [DataField, AutoNetworkedField] public TimeSpan Interval = TimeSpan.FromSeconds(1); /// /// The next time the damage should occur at. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField, AutoPausedField] public TimeSpan NextDamage; /// /// How long to pause the passive health change after damage has been taken. /// [DataField, AutoNetworkedField] public TimeSpan IntervalHaltOnDamageTaken; }