using Content.Server.Advertise.EntitySystems; using Content.Shared.Dataset; using Robust.Shared.Prototypes; namespace Content.Server.Advertise.Components; /// /// Makes this entity periodically advertise by speaking a randomly selected /// message from a specified dataset into local chat. /// [RegisterComponent, Access(typeof(AdvertiseSystem))] public sealed partial class AdvertiseComponent : Component { /// /// Minimum time in seconds to wait before saying a new ad, in seconds. Has to be larger than or equal to 1. /// [DataField] public int MinimumWait { get; private set; } = 8 * 60; /// /// Maximum time in seconds to wait before saying a new ad, in seconds. Has to be larger than or equal /// to /// [DataField] public int MaximumWait { get; private set; } = 10 * 60; /// /// If true, the delay before the first advertisement (at MapInit) will ignore /// and instead be rolled between 0 and . This only applies to the initial delay; /// will be respected after that. /// [DataField] public bool Prewarm = true; /// /// The identifier for the advertisements dataset prototype. /// [DataField(required: true)] public ProtoId Pack { get; private set; } /// /// The next time an advertisement will be said. /// [DataField] public TimeSpan NextAdvertisementTime { get; set; } = TimeSpan.Zero; }