using Content.Shared.Damage;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Projectiles;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ProjectileComponent : Component
{
///
/// The effect that appears when a projectile collides with an entity.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public EntProtoId? ImpactEffect;
///
/// User that shot this projectile.
///
[DataField, AutoNetworkedField]
public EntityUid? Shooter;
///
/// Weapon used to shoot.
///
[DataField, AutoNetworkedField]
public EntityUid? Weapon;
///
/// The projectile spawns inside the shooter most of the time, this prevents entities from shooting themselves.
///
[DataField, AutoNetworkedField]
public bool IgnoreShooter = true;
///
/// The amount of damage the projectile will do.
///
[DataField(required: true)] [ViewVariables(VVAccess.ReadWrite)]
public DamageSpecifier Damage = new();
///
/// If the projectile should be deleted on collision.
///
[DataField]
public bool DeleteOnCollide = true;
///
/// Ignore all damage resistances the target has.
///
[DataField]
public bool IgnoreResistances = false;
///
/// Get that juicy FPS hit sound.
///
[DataField]
public SoundSpecifier? SoundHit;
///
/// Force the projectiles sound to play rather than potentially playing the entity's sound.
///
[DataField]
public bool ForceSound = false;
///
/// Whether this projectile will only collide with entities if it was shot from a gun (if is not null).
///
[DataField]
public bool OnlyCollideWhenShot = false;
///
/// Whether this projectile has already damaged an entity.
///
[DataField]
public bool DamagedEntity;
}