using Content.Shared._Shitmed.Targeting;
using System.Numerics;
using Content.Shared.Damage;
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.GameStates;
namespace Content.Shared.Projectiles;
///
/// Embeds this entity inside of the hit target.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class EmbeddableProjectileComponent : Component
{
///
/// Minimum speed of the projectile to embed.
///
[DataField, AutoNetworkedField]
public float MinimumSpeed = 5f;
///
/// Delete the entity on embedded removal?
/// Does nothing if there's no RemovalTime.
///
[DataField, AutoNetworkedField]
public bool DeleteOnRemove;
///
/// How long it takes to remove the embedded object.
///
[DataField, AutoNetworkedField]
public float? RemovalTime = 5f;
///
/// Whether this entity will embed when thrown, or only when shot as a projectile.
///
[DataField, AutoNetworkedField]
public bool EmbedOnThrow = true;
///
/// How far into the entity should we offset (0 is wherever we collided).
///
[DataField, AutoNetworkedField]
public Vector2 Offset = Vector2.Zero;
///
/// Sound to play after embedding into a hit target.
///
[DataField, AutoNetworkedField]
public SoundSpecifier? Sound;
///
/// Uid of the entity the projectile is embed into.
///
[DataField, AutoNetworkedField]
public EntityUid? EmbeddedIntoUid;
///
/// How much time before this entity automatically falls off? (0 is never)
///
[DataField, AutoNetworkedField]
public float AutoRemoveDuration = 40f;
///
/// The time when this entity automatically falls off after being attached.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField]
public TimeSpan? AutoRemoveTime = null;
///
/// The body part of the target this embeddable is attached to.
///
[ViewVariables, AutoNetworkedField]
public TargetBodyPart? TargetBodyPart = null;
// WD EDIT START
[DataField]
public DamageSpecifier Damage = new();
[DataField]
public bool PreventCollide;
// WD EDIT END
}