using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.Weapons.Ranged.Components; /// /// Simply provides a certain capacity of entities that cannot be reloaded through normal means and have /// no special behavior like cycling, magazine /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class BasicEntityAmmoProviderComponent : AmmoProviderComponent { [ViewVariables(VVAccess.ReadWrite)] [DataField("proto", required: true, customTypeSerializer:typeof(PrototypeIdSerializer))] public string Proto = default!; /// /// Max capacity. /// [ViewVariables(VVAccess.ReadWrite)] [DataField("capacity")] [AutoNetworkedField] public int? Capacity = null; /// /// Actual ammo left. Initialized to capacity unless they are non-null and differ. /// [ViewVariables(VVAccess.ReadWrite)] [DataField("count")] [AutoNetworkedField] public int? Count = null; }