AnomalySupercriticalComponent.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. using Robust.Shared.GameStates;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  3. namespace Content.Shared.Anomaly.Components;
  4. /// <summary>
  5. /// Tracks anomalies going supercritical
  6. /// </summary>
  7. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  8. [Access(typeof(SharedAnomalySystem))]
  9. [AutoGenerateComponentPause]
  10. public sealed partial class AnomalySupercriticalComponent : Component
  11. {
  12. /// <summary>
  13. /// The time when the supercritical animation ends and it does whatever effect.
  14. /// </summary>
  15. [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField]
  16. [ViewVariables(VVAccess.ReadWrite)]
  17. [AutoPausedField]
  18. public TimeSpan EndTime;
  19. /// <summary>
  20. /// The length of the animation before it goes supercritical.
  21. /// </summary>
  22. [AutoNetworkedField]
  23. [ViewVariables(VVAccess.ReadWrite)]
  24. public TimeSpan SupercriticalDuration = TimeSpan.FromSeconds(10);
  25. /// <summary>
  26. /// The maximum size the anomaly scales to while going supercritical
  27. /// </summary>
  28. [DataField]
  29. public float MaxScaleAmount = 3;
  30. }