using Content.Shared.Storage.EntitySystems; using Content.Shared.Whitelist; namespace Content.Shared.Storage.Components { /// /// Storage that spawns and counts a single item. /// Usually used for things like matchboxes, cigarette packs, /// cigar cases etc. /// /// /// - type: ItemCounter /// amount: 6 # Note: this field can be omitted. /// count: /// tags: [Cigarette] /// [RegisterComponent] [Access(typeof(SharedItemCounterSystem))] public sealed partial class ItemCounterComponent : Component { [DataField("count", required: true)] public EntityWhitelist Count { get; set; } = default!; [DataField("amount")] public int? MaxAmount { get; set; } /// /// Default IconLayer stack. /// [DataField("baseLayer")] [ViewVariables(VVAccess.ReadWrite)] public string BaseLayer = ""; /// /// Determines if the visualizer uses composite or non-composite layers for icons. Defaults to false. /// /// /// /// false: they are opaque and mutually exclusive (e.g. sprites in a cable coil). Default value /// /// /// true: they are transparent and thus layered one over another in ascending order first /// /// /// /// [DataField("composite")] [ViewVariables(VVAccess.ReadWrite)] public bool IsComposite; /// /// Sprite layers used in counter visualizer. Sprites first in layer correspond to lower stack states /// e.g. _spriteLayers[0] is lower stack level than _spriteLayers[1]. /// [DataField("layerStates")] [ViewVariables(VVAccess.ReadWrite)] public List LayerStates = new(); } }