using System.Threading;
using Robust.Shared.Audio;
using Content.Shared.Storage;
using Content.Shared.Mail;
namespace Content.Server.Mail.Components;
[RegisterComponent]
public sealed partial class MailComponent : SharedMailComponent
{
[DataField]
public string Recipient = "None";
[DataField]
public string RecipientJob = "None";
///
/// Why do we not use LockComponent?
/// Because this can't be locked again,
/// and we have special conditions for unlocking,
/// and we don't want to add a verb.
///
[DataField]
public bool IsLocked = true;
///
/// Is this parcel profitable to deliver for the station?
///
///
/// The station won't receive any award on delivery if this is false.
/// This is useful for broken fragile packages and packages that were
/// not delivered in time.
///
[DataField]
public bool IsProfitable = true;
///
/// Is this package considered fragile?
///
///
/// This can be set to true in the YAML files for a mail delivery to
/// always be Fragile, despite its contents.
///
[DataField]
public bool IsFragile = false;
///
/// Is this package considered priority mail?
///
///
/// There will be a timer set for its successful delivery. The
/// station's bank account will be penalized if it is not delivered on
/// time.
///
/// This is set to false on successful delivery.
///
/// This can be set to true in the YAML files for a mail delivery to always be Priority.
///
[DataField]
public bool IsPriority = false;
///
/// Whether this parcel is large.
///
[DataField]
public bool IsLarge = false;
///
/// What will be packaged when the mail is spawned.
///
[DataField]
public List Contents = new();
///
/// The amount that cargo will be awarded for delivering this mail.
///
[DataField]
public int Bounty = 750;
///
/// Penalty if the mail is destroyed.
///
[DataField]
public int Penalty = -250;
///
/// The sound that's played when the mail's lock is broken.
///
[DataField]
public SoundSpecifier PenaltySound = new SoundPathSpecifier("/Audio/Machines/Nuke/angry_beep.ogg");
///
/// The sound that's played when the mail's opened.
///
[DataField]
public SoundSpecifier OpenSound = new SoundPathSpecifier("/Audio/Effects/packetrip.ogg");
///
/// The sound that's played when the mail's lock has been emagged.
///
[DataField]
public SoundSpecifier EmagSound = new SoundCollectionSpecifier("sparks");
///
/// Whether this component is enabled.
/// Removed when it becomes trash.
///
public bool IsEnabled = true;
public CancellationTokenSource? PriorityCancelToken;
}