using Robust.Shared.Containers; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.Weapon.Ranged.Ammunition.Components { /// /// Used to load certain ranged weapons quickly /// [RegisterComponent] public sealed class SpeedLoaderComponent : Component { [DataField("caliber")] public BallisticCaliber Caliber = BallisticCaliber.Unspecified; public int Capacity => _capacity; [DataField("capacity")] private int _capacity = 6; public Container AmmoContainer = default!; public Stack SpawnedAmmo = new(); public int UnspawnedCount; public int AmmoLeft => SpawnedAmmo.Count + UnspawnedCount; [DataField("fillPrototype", customTypeSerializer:typeof(PrototypeIdSerializer))] public string? FillPrototype; } }