2023-05-05 21:50:09 -04:00
|
|
|
using Content.Shared.Weapons.Ranged.Systems;
|
|
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Weapons.Ranged.Components;
|
|
|
|
|
|
2024-12-21 15:54:11 +11:00
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true), Access(typeof(SharedGunSystem))]
|
2023-05-05 21:50:09 -04:00
|
|
|
public sealed partial class SolutionAmmoProviderComponent : Component
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The solution where reagents are extracted from for the projectile.
|
|
|
|
|
/// </summary>
|
2024-12-21 15:54:11 +11:00
|
|
|
[DataField(required: true), AutoNetworkedField]
|
2023-05-05 21:50:09 -04:00
|
|
|
public string SolutionId = default!;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How much reagent it costs to fire once.
|
|
|
|
|
/// </summary>
|
2024-12-21 15:54:11 +11:00
|
|
|
[DataField, AutoNetworkedField]
|
2023-09-02 01:32:08 -04:00
|
|
|
public float FireCost = 5;
|
2023-05-05 21:50:09 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The amount of shots currently available.
|
|
|
|
|
/// used for network predictions.
|
|
|
|
|
/// </summary>
|
2024-12-21 15:54:11 +11:00
|
|
|
[DataField, AutoNetworkedField]
|
2023-05-05 21:50:09 -04:00
|
|
|
public int Shots;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The max amount of shots the gun can fire.
|
|
|
|
|
/// used for network prediction
|
|
|
|
|
/// </summary>
|
2024-12-21 15:54:11 +11:00
|
|
|
[DataField, AutoNetworkedField]
|
2023-05-05 21:50:09 -04:00
|
|
|
public int MaxShots;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The prototype that's fired by the gun.
|
|
|
|
|
/// </summary>
|
2024-12-21 15:54:11 +11:00
|
|
|
[DataField("proto")]
|
|
|
|
|
public EntProtoId Prototype;
|
2023-05-05 21:50:09 -04:00
|
|
|
}
|