using Content.Shared.Whitelist; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Shared.StatusEffectNew.Components; /// /// Marker component for all status effects - every status effect entity should have it. /// Provides a link between the effect and the affected entity, and some data common to all status effects. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true), AutoGenerateComponentPause] [Access(typeof(StatusEffectsSystem))] [EntityCategory("StatusEffects")] public sealed partial class StatusEffectComponent : Component { /// /// The entity that this status effect is applied to. /// [DataField, AutoNetworkedField] public EntityUid? AppliedTo; /// /// When this effect will start. Set to Timespan.Zero to start the effect immediately. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField, AutoNetworkedField] public TimeSpan StartEffectTime; /// /// When this effect will end. If Null, the effect lasts indefinitely. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField, AutoNetworkedField] public TimeSpan? EndEffectTime; /// /// If true, this status effect has been applied. Used to ensure that only fires once. /// [DataField, AutoNetworkedField] public bool Applied; /// /// Offbrand - When the status effect started /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField, AutoNetworkedField] public TimeSpan? StartedAt; /// /// Whitelist, by which it is determined whether this status effect can be imposed on a particular entity. /// [DataField] public EntityWhitelist? Whitelist; /// /// Blacklist, by which it is determined whether this status effect can be imposed on a particular entity. /// [DataField] public EntityWhitelist? Blacklist; }