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. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public float MinimumSpeed = 5f; /// /// Delete the entity on embedded removal? /// Does nothing if there's no RemovalTime. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public bool DeleteOnRemove; /// /// How long it takes to remove the embedded object. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public float? RemovalTime = 5f; /// /// Whether this entity will embed when thrown, or only when shot as a projectile. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public bool EmbedOnThrow = true; /// /// How far into the entity should we offset (0 is wherever we collided). /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public Vector2 Offset = Vector2.Zero; /// /// Sound to play after embedding into a hit target. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public SoundSpecifier? Sound; /// /// The entity this embeddable is attached to. /// [ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] public EntityUid? Target = null; /// /// The body part of the target this embeddable is attached to. /// [ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] public TargetBodyPart? TargetBodyPart = null; /// /// How much time before this entity automatically falls off? (0 is never) /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public float AutoRemoveDuration = 40f; /// /// The time when this entity automatically falls off after being attached. /// [ViewVariables(VVAccess.ReadWrite), DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField] public TimeSpan? AutoRemoveTime = null; // WD EDIT START [DataField] public DamageSpecifier Damage = new(); [DataField] public bool PreventCollide; // WD EDIT END }