Files
wwdpublic/Content.Server/Mail/Components/MailTeleporterComponent.cs
Mnemotechnican b254b8505c Feat: Port All Delta-V Mail Improvements (#1011)
# Description
Showing some love to our hard-working couriers.

This cherry-picks the following PRs from delta-v:
- https://github.com/DeltaV-Station/Delta-v/pull/1472 - Adds a
MailMetrics PDA cartridge for couriers and the LO
- https://github.com/DeltaV-Station/Delta-v/pull/1652 - Ports mail
tweaks from frontier to delta-v, adding large packages, RPDs (mail
cannons), and more mail
- https://github.com/DeltaV-Station/Delta-v/pull/1788 - Adding a couple
more packages
- https://github.com/DeltaV-Station/Delta-v/pull/1925 - Fixing the
non-functional "last known location" part of mail descriptions

Some mail items, such as the opporozidone syringe and rainbow
joints/blunts, had to be disabled because we don't have them (yet?)

<details><summary><h1>Media</h1></summary>
<p>

![image](https://github.com/user-attachments/assets/2299ffc3-17ce-4743-886c-7705e8789e96)

![image](https://github.com/user-attachments/assets/a2ee1a07-d765-41e7-8f70-f94a50412398)

![image](https://github.com/user-attachments/assets/03b16b8e-0eff-4332-99ad-d4a201ee8f2b)

![image](https://github.com/user-attachments/assets/44d2e5c2-db79-4d8d-8877-693648edd35d)

![image](https://github.com/user-attachments/assets/f3d7bdbb-fc14-4f2f-bf30-aa54fdf49099)

![image](https://github.com/user-attachments/assets/b1e4c53f-c9d8-496b-a72e-f4f4b702e368)

</p>
</details>

---

# Changelog
🆑
- add: The Courier and Logistics Officer now have a new program in their
PDA for tracking mail delivery performance, including earnings and
percent of packages opened, damaged, or expired.
- add: The list of possible mail packages has been greately expanded,
and now includes large parcels.
- add: The CourierDrobe now offers a rapid mail delivery device, along
with capsules for it.

---------

Signed-off-by: Adeinitas <147965189+adeinitas@users.noreply.github.com>
Co-authored-by: portfiend <109661617+portfiend@users.noreply.github.com>
Co-authored-by: byte <50130120+huckleton@users.noreply.github.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: Adeinitas <147965189+adeinitas@users.noreply.github.com>
Co-authored-by: ErhardSteinhauer <65374927+ErhardSteinhauer@users.noreply.github.com>
Co-authored-by: Dvir <dvirf01@gmail.com>
Co-authored-by: Dvir <39403717+dvir001@users.noreply.github.com>
Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>
Co-authored-by: Whatstone <whatstone3@gmail.com>
Co-authored-by: Danger Revolution! <142105406+DangerRevolution@users.noreply.github.com>
Co-authored-by: Milon <plmilonpl@gmail.com>
# Conflicts:
#	Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml
2024-10-19 13:49:46 +07:00

119 lines
3.8 KiB
C#

using Robust.Shared.Audio;
namespace Content.Server.Mail.Components;
/// <summary>
/// This is for the mail teleporter.
/// Random mail will be teleported to this every few minutes.
/// </summary>
[RegisterComponent]
public sealed partial class MailTeleporterComponent : Component
{
// <remarks>Not starting accumulator at 0 so mail carriers have some deliveries to make shortly after roundstart.</remarks>
[DataField]
public float Accumulator = 285f;
[DataField]
public TimeSpan TeleportInterval = TimeSpan.FromMinutes(5);
/// <summary>
/// The sound that's played when new mail arrives.
/// </summary>
[DataField]
public SoundSpecifier TeleportSound = new SoundPathSpecifier("/Audio/Effects/teleport_arrival.ogg");
/// <summary>
/// The MailDeliveryPoolPrototype that's used to select what mail this
/// teleporter can deliver.
/// </summary>
[DataField]
public string MailPool = "RandomDeltaVMailDeliveryPool";
/// <summary>
/// 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.
/// </summary>
[DataField]
public int CandidatesPerDelivery = 8;
[DataField]
public int MinimumDeliveriesPerTeleport = 1;
/// <summary>
/// Do not teleport any more mail in, if there are at least this many
/// undelivered parcels.
/// </summary>
/// <remarks>
/// Currently this works by checking how many MailComponent entities
/// are sitting on the teleporter's tile.<br/><br/>
///
/// 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.<br/><br/>
///
/// 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.
/// </remarks>
[DataField]
public int MaximumUndeliveredParcels = 5;
/// <summary>
/// Any item that breaks or is destroyed in less than this amount of
/// damage is one of the types of items considered fragile.
/// </summary>
[DataField]
public int FragileDamageThreshold = 10;
/// <summary>
/// What's the bonus for delivering a fragile package intact?
/// </summary>
[DataField]
public int FragileBonus = 100;
/// <summary>
/// What's the malus for failing to deliver a fragile package?
/// </summary>
[DataField]
public int FragileMalus = -100;
/// <summary>
/// What's the chance for any one delivery to be marked as priority mail?
/// </summary>
[DataField]
public float PriorityChance = 0.1f;
/// <summary>
/// How long until a priority delivery is considered as having failed
/// if not delivered?
/// </summary>
[DataField]
public TimeSpan PriorityDuration = TimeSpan.FromMinutes(5);
/// <summary>
/// What's the bonus for delivering a priority package on time?
/// </summary>
[DataField]
public int PriorityBonus = 250;
/// <summary>
/// What's the malus for failing to deliver a priority package?
/// </summary>
[DataField]
public int PriorityMalus = -250;
/// <summary>
/// What's the bonus for delivering a large package intact?
/// </summary>
[DataField]
public int LargeBonus = 1500;
/// <summary>
/// What's the malus for failing to deliver a large package?
/// </summary>
[DataField]
public int LargeMalus = -500;
}