using Content.Shared.Dataset; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Shared._DV.Pain; [RegisterComponent, NetworkedComponent] [AutoGenerateComponentState, AutoGenerateComponentPause] public sealed partial class PainComponent : Component { /// /// Whether pain effects are currently suppressed by painkillers /// [DataField, AutoNetworkedField] public bool Suppressed; /// /// The current level of pain suppression /// [DataField] public PainSuppressionLevel CurrentSuppressionLevel = PainSuppressionLevel.Normal; /// /// The last time painkillers were administered /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoPausedField] public TimeSpan LastPainkillerTime; /// /// When the pain suppression effect ends /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoPausedField] public TimeSpan SuppressionEndTime; /// /// When to next update this component /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoPausedField] public TimeSpan NextUpdateTime; /// /// When to show the next pain effect popup /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoPausedField] public TimeSpan NextPopupTime; /// /// The dataset of pain effect messages to display /// [DataField] public ProtoId DatasetPrototype = "PainEffects"; /// /// Minimum time between pain popups in seconds /// [DataField] public float MinimumPopupDelay = 1f; /// /// Maximum time between pain popups in seconds /// [DataField] public float MaximumPopupDelay = 40f; }