Event horizon serialization (#18173)

This commit is contained in:
metalgearsloth
2023-07-30 20:47:44 +10:00
committed by GitHub
parent c00601acfc
commit fae9a05ea2
2 changed files with 20 additions and 12 deletions

View File

@@ -1,5 +1,6 @@
using Robust.Shared.GameStates;
using Content.Shared.Singularity.EntitySystems;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Singularity.Components;
@@ -59,19 +60,13 @@ public sealed class EventHorizonComponent : Component
/// </summary>
[DataField("consumePeriod")]
[ViewVariables(VVAccess.ReadWrite)]
public TimeSpan TargetConsumePeriod { get; set; } = TimeSpan.FromSeconds(0.5);
/// <summary>
/// The last time at which this consumed everything it overlapped with.
/// </summary>
[ViewVariables(VVAccess.ReadOnly)]
public TimeSpan LastConsumeWaveTime { get; set; } = default!;
public TimeSpan TargetConsumePeriod = TimeSpan.FromSeconds(0.5);
/// <summary>
/// The next time at which this consumed everything it overlapped with.
/// </summary>
[ViewVariables(VVAccess.ReadOnly)]
public TimeSpan NextConsumeWaveTime { get; set; } = default!;
[ViewVariables(VVAccess.ReadOnly), DataField("nextConsumeWaveTime", customTypeSerializer:typeof(TimeOffsetSerializer))]
public TimeSpan NextConsumeWaveTime;
#endregion Update Timing
}