using Content.Server.Fluids.EntitySystems; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Server.Fluids.Components; [RegisterComponent] [Access(typeof(FluidSpreaderSystem))] public sealed class FluidMapDataComponent : Component { /// /// At what time will be checked next /// [DataField("goalTime", customTypeSerializer:typeof(TimeOffsetSerializer))] public TimeSpan GoalTime; /// /// Delay between two runs of /// [DataField("delay")] public TimeSpan Delay = TimeSpan.FromSeconds(2); /// /// Puddles to be expanded. /// [DataField("puddles")] public HashSet Puddles = new(); /// /// Convenience method for setting GoalTime to + /// /// Time to which to add , defaults to current public void UpdateGoal(TimeSpan? start = null) { GoalTime = (start ?? GoalTime) + Delay; } }