using Content.Server.Advertisements;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Advertise
{
[RegisterComponent, Friend(typeof(AdvertiseSystem))]
public sealed 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.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("minWait")]
public int MinimumWait { get; } = 8 * 60;
///
/// Maximum time in seconds to wait before saying a new ad, in seconds. Has to be larger than or equal
/// to
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("maxWait")]
public int MaximumWait { get; } = 10 * 60;
///
/// The identifier for the advertisements pack prototype.
///
[DataField("pack", customTypeSerializer:typeof(PrototypeIdSerializer))]
public string PackPrototypeId { get; } = string.Empty;
///
/// The next time an advertisement will be said.
///
[ViewVariables(VVAccess.ReadWrite)]
public TimeSpan NextAdvertisementTime { get; set; } = TimeSpan.Zero;
///
/// Whether the entity will say advertisements or not.
///
[ViewVariables(VVAccess.ReadWrite)]
public bool Enabled { get; set; } = true;
}
}