using System.Threading;
using Robust.Shared.Audio;
using Content.Shared.Storage;
using Content.Shared._DV.Mail;
namespace Content.Server._DV.Mail.Components
{
[RegisterComponent]
public sealed partial class MailComponent : SharedMailComponent
{
[DataField, ViewVariables(VVAccess.ReadWrite)]
public string Recipient = "None";
[DataField, ViewVariables(VVAccess.ReadWrite)]
public string RecipientJob = "None";
[DataField, ViewVariables(VVAccess.ReadWrite)]
public string RecipientStation = "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, ViewVariables(VVAccess.ReadWrite)]
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;
// Frontier: large mail
///
/// Whether this parcel is large.
///
[DataField]
public bool IsLarge = false;
// End Frontier: large mail
///
/// 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 = 7500; // Frontier 750<7500
///
/// Penalty if the mail is destroyed.
///
///
/// Frontier: should be non-negative.
/// ///
[DataField]
public int Penalty = 0; // Frontier - -250<0
///
/// 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;
}
}