using Robust.Shared.Audio; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Server.StationEvents.Components; /// /// Defines basic data for a station event /// [RegisterComponent, AutoGenerateComponentPause] public sealed partial 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] public float Weight = WeightNormal; [DataField] public string? StartAnnouncement; [DataField] public string? EndAnnouncement; [DataField] public Color StartAnnouncementColor = Color.Gold; [DataField] public Color EndAnnouncementColor = Color.Gold; [DataField] public SoundSpecifier? StartAudio; [DataField] public SoundSpecifier? EndAudio; /// /// In minutes, when is the first round time this event can start /// [DataField] public int EarliestStart = 5; /// /// In minutes, the amount of time before the same event can occur again /// [DataField] public int ReoccurrenceDelay = 30; /// /// How long the event lasts. /// [DataField] public TimeSpan? Duration = TimeSpan.FromSeconds(1); /// /// The max amount of time the event lasts. /// [DataField] 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] public int MinimumPlayers; /// /// How many times this even can occur in a single round /// [DataField] public int? MaxOccurrences; /// /// When the station event ends. /// [DataField("endTime", customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoPausedField] public TimeSpan? EndTime; /// /// If false, the event won't trigger during ongoing evacuation. /// [DataField] public bool OccursDuringRoundEnd = true; }