Files
tbd-station-14/Content.Shared/Storage/Components/ItemCounterComponent.cs
Ygg01 53b53c3e0e Cigarette ecs (#4495)
* Reorganized Shared.Storage folder

* Replace StorageCounter with Item Counter

* Change stack visuals setting data

* Fix mirrorcult suggestions

* Fix items from upstream

* Fix type formatting
2021-09-04 10:42:32 -07:00

34 lines
964 B
C#

using Content.Shared.Storage.EntitySystems;
using Content.Shared.Whitelist;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Shared.Storage.Components
{
/// <summary>
/// Storage that spawns and counts a single item.
/// Usually used for things like matchboxes, cigarette packs,
/// cigar cases etc.
/// </summary>
/// <code>
/// - type: ItemCounter
/// amount: 6 # Note: this field can be omitted.
/// count:
/// tags: [Cigarette]
/// </code>
[RegisterComponent]
[Friend(typeof(SharedItemCounterSystem))]
public class ItemCounterComponent : Component
{
public override string Name => "ItemCounter";
[DataField("count", required: true)]
public EntityWhitelist Count { get; set; } = default!;
[DataField("amount")]
public int? MaxAmount { get; set; }
}
}