using Content.Shared.FixedPoint; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; namespace Content.Shared.Store; /// /// Prototype used to define different types of currency for generic stores. /// Mainly used for antags, such as traitors, nukies, and revenants /// This is separate to the cargo ordering system. /// [Prototype] [DataDefinition, Serializable, NetSerializable] public sealed partial class CurrencyPrototype : IPrototype { [ViewVariables] [IdDataField] public string ID { get; private set; } = default!; /// /// The Loc string used for displaying the currency in the store ui. /// doesn't necessarily refer to the full name of the currency, only /// that which is displayed to the user. /// [DataField("displayName")] public string DisplayName { get; private set; } = string.Empty; /// /// The physical entity of the currency /// [DataField("cash", customTypeSerializer: typeof(PrototypeIdValueDictionarySerializer))] public Dictionary? Cash { get; private set; } /// /// Whether or not this currency can be withdrawn from a shop by a player. Requires a valid entityId. /// [DataField("canWithdraw")] public bool CanWithdraw { get; private set; } = true; }