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 int PlayerToDeliveryRatio = 7; /// /// The minimum amount of deliveries that will spawn. /// This is not per spawner unless DistributeRandomly is false. /// [DataField] public int MinimumDeliverySpawn = 1; /// /// Any item that breaks or is destroyed in less than this amount of /// damage is one of the types of items considered fragile. /// [DataField] public int FragileDamageThreshold = 10; /// /// Bonus for delivering a fragile package intact. /// [DataField] public int FragileBonus = 100; /// /// Malus for failing to deliver a fragile package intact. /// [DataField] public int FragileMalus = -100; /// /// What's the chance for any one delivery to be marked as priority mail? /// [DataField] public float PriorityChance = 0.1f; /// /// How long until a priority delivery is considered as having failed /// if not delivered? /// [DataField] public TimeSpan PriorityDuration = TimeSpan.FromMinutes(5); /// /// What's the bonus for delivering a priority package on time? /// [DataField] public int PriorityBonus = 250; /// /// What's the malus for failing to deliver a priority package? /// [DataField] public int PriorityMalus = -250; /// /// 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; }