using Robust.Shared.Audio; namespace Content.Server.Mail.Components; /// /// This is for the mail teleporter. /// Random mail will be teleported to this every few minutes. /// [RegisterComponent] public sealed partial class MailTeleporterComponent : Component { // Not starting accumulator at 0 so mail carriers have some deliveries to make shortly after roundstart. [DataField] public float Accumulator = 285f; [DataField] public TimeSpan TeleportInterval = TimeSpan.FromMinutes(5); /// /// The sound that's played when new mail arrives. /// [DataField] public SoundSpecifier TeleportSound = new SoundPathSpecifier("/Audio/Effects/teleport_arrival.ogg"); /// /// The MailDeliveryPoolPrototype that's used to select what mail this /// teleporter can deliver. /// [DataField] public string MailPool = "RandomDeltaVMailDeliveryPool"; /// /// How many mail candidates do we need per actual delivery sent when /// the mail goes out? The number of candidates is divided by this number /// to determine how many deliveries will be teleported in. /// It does not determine unique recipients. That is random. /// [DataField] public int CandidatesPerDelivery = 8; [DataField] public int MinimumDeliveriesPerTeleport = 1; /// /// Do not teleport any more mail in, if there are at least this many /// undelivered parcels. /// /// /// Currently this works by checking how many MailComponent entities /// are sitting on the teleporter's tile.

/// /// It should be noted that if the number of actual deliveries to be /// made based on the number of candidates divided by candidates per /// delivery exceeds this number, the teleporter will spawn more mail /// than this number.

/// /// This is just a simple check to see if anyone's been picking up the /// mail lately to prevent entity bloat for the sake of performance. ///
[DataField] public int MaximumUndeliveredParcels = 5; /// /// 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; /// /// What's the bonus for delivering a fragile package intact? /// [DataField] public int FragileBonus = 100; /// /// What's the malus for failing to deliver a fragile package? /// [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; /// /// What's the bonus for delivering a large package intact? /// [DataField] public int LargeBonus = 1500; /// /// What's the malus for failing to deliver a large package? /// [DataField] public int LargeMalus = -500; }