using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Weapons.Ranged.Components;
///
/// Allows the entity to be fired from a gun.
///
[RegisterComponent, Virtual]
public partial class AmmoComponent : Component, IShootable
{
// Muzzle flash stored on ammo because if we swap a gun to whatever we may want to override it.
[DataField]
public EntProtoId? MuzzleFlash = "MuzzleFlashEffect";
}
///
/// Spawns another prototype to be shot instead of itself.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true)]
public sealed partial class CartridgeAmmoComponent : AmmoComponent
{
///
/// Prototype of the ammo to be shot.
///
[DataField("proto", required: true)]
public EntProtoId Prototype;
///
/// Is this cartridge spent?
///
[DataField, AutoNetworkedField]
public bool Spent;
///
/// Is this cartridge automatically marked as trash once spent?
///
[DataField, AutoNetworkedField]
public bool MarkSpentAsTrash = true;
///
/// Caseless ammunition.
///
[DataField]
public bool DeleteOnSpawn;
///
/// Sound the case makes when it leaves the weapon.
///
[DataField("soundEject")]
public SoundSpecifier? EjectSound = new SoundCollectionSpecifier("CasingEject");
}