using Content.Shared.Destructible.Thresholds; using Content.Shared.Weather; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Server.DeltaV.Weather; /// /// Makes weather randomly happen every so often. /// [RegisterComponent, Access(typeof(WeatherSchedulerSystem))] [AutoGenerateComponentPause] public sealed partial class WeatherSchedulerComponent : Component { /// /// Weather stages to schedule. /// [DataField(required: true)] public List Stages = new(); /// /// The index of to use next, wraps back to the start. /// [DataField] public int Stage; /// /// When to go to the next step of the schedule. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] public TimeSpan NextUpdate; } /// /// A stage in a weather schedule. /// [Serializable, DataDefinition] public partial struct WeatherStage { /// /// A range of how long the stage can last for, in seconds. /// [DataField(required: true)] public MinMax Duration = new(0, 0); /// /// The weather prototype to add, or null for clear weather. /// [DataField] public ProtoId? Weather; /// /// Alert message to send in chat for players on the map when it starts. /// [DataField] public LocId? Message; }