using System.Numerics; using Robust.Shared.Audio; 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 = 3f; /// /// 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; }