using System.Threading; using Content.Shared._NF.Cargo; using Robust.Shared.GameStates; namespace Content.Shared._NF.Trade; /// /// This is used to mark an entity to be used as a trade crate /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentPause, Access(typeof(SharedNFCargoSystem))] public sealed partial class TradeCrateComponent : Component { /// /// The value of the crate, in spesos, when delivered to its destination. /// [DataField(serverOnly: true)] public int ValueAtDestination; /// /// The value of the crate, in spesos, when delivered elsewhere. /// [DataField(serverOnly: true)] public int ValueElsewhere; /// /// If non-zero, this crate will be an express delivery. /// [DataField(serverOnly: true)] public TimeSpan ExpressDeliveryDuration = TimeSpan.Zero; /// /// If non-null, the package must be redeemed before this time to arrive unpenalized. /// [ViewVariables, AutoPausedField] public TimeSpan? ExpressDeliveryTime; /// /// The bonus this package will receive if delivered on-time. /// [DataField(serverOnly: true)] public int ExpressOnTimeBonus; /// /// The penalty this package will receive if delivered late. /// [DataField(serverOnly: true)] public int ExpressLatePenalty; /// /// This crate's destination. /// [ViewVariables] public EntityUid DestinationStation; /// /// Cancellation token used to disable the express marker on the crate. /// public CancellationTokenSource? ExpressCancelToken; }