using Content.Shared.Damage; using Content.Shared.Destructible.Thresholds; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Server._DV.Weather; /// /// Makes weather randomly happen every so often. /// [RegisterComponent, Access(typeof(WeatherSchedulerSystem), typeof(WeatherEffectsSystem))] [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 and apply the next weather transition. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] public TimeSpan NextUpdate; /// /// When to go and apply the next damage update. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] public TimeSpan NextDamageUpdate; } /// /// 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 to add, or null for clear weather. /// [DataField] public EntProtoId? Weather; /// /// Alert message to send in chat for players on the map when it starts. /// [DataField] public LocId? Message; /// /// Damage Specifier to tell how much damage a stage should do /// [DataField] public DamageSpecifier? Damage; }