using Robust.Shared.GameStates; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Shared.Anomaly.Components; /// /// Tracks anomalies going supercritical /// [RegisterComponent, NetworkedComponent, Access(typeof(SharedAnomalySystem))] public sealed partial class AnomalySupercriticalComponent : Component { /// /// The time when the supercritical animation ends and it does whatever effect. /// [DataField("endTime", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)] public TimeSpan EndTime; /// /// The length of the animation before it goes supercritical. /// [ViewVariables(VVAccess.ReadWrite)] public TimeSpan SupercriticalDuration = TimeSpan.FromSeconds(10); /// /// The maximum size the anomaly scales to while going supercritical /// [DataField("maxScaleAmount")] public float MaxScaleAmount = 3; } [Serializable, NetSerializable] public sealed class AnomalySupercriticalComponentState : ComponentState { public TimeSpan EndTime; public TimeSpan Duration; }