Files
crystall-punk-14/Content.Shared/Anomaly/Components/AnomalySupercriticalComponent.cs

38 lines
1.2 KiB
C#
Raw Normal View History

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