Files
tbd-station-14/Content.Shared/Weapons/Ranged/Components/BasicEntityAmmoProviderComponent.cs
Kara 47262a6998 Gun auto state handlers (#15186)
* battery auto state

* basic entity autostate

* ballistic autostate

* flyby

* cartridge ammo

* gun

* Revert "battery auto state"

This reverts commit 35b7d62f303fddb0edd9eb7a922e3c26b7a5f7fb.

* silly
2023-04-13 18:08:56 -07:00

35 lines
1.2 KiB
C#

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