SolutionAmmoProviderComponent.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using Content.Shared.Weapons.Ranged.Systems;
  2. using Robust.Shared.GameStates;
  3. using Robust.Shared.Prototypes;
  4. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  5. namespace Content.Shared.Weapons.Ranged.Components;
  6. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true), Access(typeof(SharedGunSystem))]
  7. public sealed partial class SolutionAmmoProviderComponent : Component
  8. {
  9. /// <summary>
  10. /// The solution where reagents are extracted from for the projectile.
  11. /// </summary>
  12. [DataField(required: true), AutoNetworkedField]
  13. public string SolutionId = default!;
  14. /// <summary>
  15. /// How much reagent it costs to fire once.
  16. /// </summary>
  17. [DataField, AutoNetworkedField]
  18. public float FireCost = 5;
  19. /// <summary>
  20. /// The amount of shots currently available.
  21. /// used for network predictions.
  22. /// </summary>
  23. [DataField, AutoNetworkedField]
  24. public int Shots;
  25. /// <summary>
  26. /// The max amount of shots the gun can fire.
  27. /// used for network prediction
  28. /// </summary>
  29. [DataField, AutoNetworkedField]
  30. public int MaxShots;
  31. /// <summary>
  32. /// The prototype that's fired by the gun.
  33. /// </summary>
  34. [DataField("proto")]
  35. public EntProtoId Prototype;
  36. }