using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.Delivery;
///
/// Component given to a station to indicate it can have deliveries spawn on it.
///
[RegisterComponent, AutoGenerateComponentPause]
public sealed partial class CargoDeliveryDataComponent : Component
{
///
/// The time at which the next delivery will spawn.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
public TimeSpan NextDelivery;
///
/// Minimum cooldown after a delivery spawns.
///
[DataField]
public TimeSpan MinDeliveryCooldown = TimeSpan.FromMinutes(3);
///
/// Maximum cooldown after a delivery spawns.
///
[DataField]
public TimeSpan MaxDeliveryCooldown = TimeSpan.FromMinutes(7);
///
/// The ratio at which deliveries will spawn, based on the amount of people in the crew manifest.
/// 1 delivery per X players.
///
[DataField]
public float PlayerToDeliveryRatio = 7f;
///
/// The minimum amount of deliveries that will spawn.
/// This is not per spawner unless DistributeRandomly is false.
///
[DataField]
public int MinimumDeliverySpawn = 1;
///
/// Should deliveries be randomly split between spawners?
/// If true, the amount of deliveries will be spawned randomly across all spawners.
/// If false, an amount of mail based on PlayerToDeliveryRatio will be spawned on all spawners.
///
[DataField]
public bool DistributeRandomly = true;
}