using Robust.Shared.Audio; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Server.StationEvents.Components; /// /// Defines basic data for a station event /// [RegisterComponent] public sealed class StationEventComponent : Component { public const float WeightVeryLow = 0.0f; public const float WeightLow = 5.0f; public const float WeightNormal = 10.0f; public const float WeightHigh = 15.0f; public const float WeightVeryHigh = 20.0f; [DataField("weight")] public float Weight = WeightNormal; [DataField("startAnnouncement")] public string? StartAnnouncement; [DataField("endAnnouncement")] public string? EndAnnouncement; [DataField("startAudio")] public SoundSpecifier? StartAudio; [DataField("endAudio")] public SoundSpecifier? EndAudio; /// /// In minutes, when is the first round time this event can start /// [DataField("earliestStart")] public int EarliestStart = 5; /// /// In minutes, the amount of time before the same event can occur again /// [DataField("reoccurrenceDelay")] public int ReoccurrenceDelay = 30; /// /// How long after being added does the event start /// [DataField("startDelay")] public TimeSpan StartDelay = TimeSpan.Zero; /// /// How long the event lasts. /// [DataField("duration")] public TimeSpan Duration = TimeSpan.FromSeconds(1); /// /// The max amount of time the event lasts. /// [DataField("maxDuration")] public TimeSpan? MaxDuration; /// /// How many players need to be present on station for the event to run /// /// /// To avoid running deadly events with low-pop /// [DataField("minimumPlayers")] public int MinimumPlayers; /// /// How many times this even can occur in a single round /// [DataField("maxOccurrences")] public int? MaxOccurrences; /// /// When the station event starts. /// [DataField("startTime", customTypeSerializer: typeof(TimeOffsetSerializer))] public TimeSpan StartTime; /// /// When the station event starts. /// [DataField("endTime", customTypeSerializer: typeof(TimeOffsetSerializer))] public TimeSpan EndTime; }