| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System.Numerics;
- using Robust.Shared.Audio;
- using Robust.Shared.GameStates;
- namespace Content.Shared.Projectiles;
- /// <summary>
- /// Embeds this entity inside of the hit target.
- /// </summary>
- [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
- public sealed partial class EmbeddableProjectileComponent : Component
- {
- /// <summary>
- /// Minimum speed of the projectile to embed.
- /// </summary>
- [DataField, AutoNetworkedField]
- public float MinimumSpeed = 5f;
- /// <summary>
- /// Delete the entity on embedded removal?
- /// Does nothing if there's no RemovalTime.
- /// </summary>
- [DataField, AutoNetworkedField]
- public bool DeleteOnRemove;
- /// <summary>
- /// How long it takes to remove the embedded object.
- /// </summary>
- [DataField, AutoNetworkedField]
- public float? RemovalTime = 3f;
- /// <summary>
- /// Whether this entity will embed when thrown, or only when shot as a projectile.
- /// </summary>
- [DataField, AutoNetworkedField]
- public bool EmbedOnThrow = true;
- /// <summary>
- /// How far into the entity should we offset (0 is wherever we collided).
- /// </summary>
- [DataField, AutoNetworkedField]
- public Vector2 Offset = Vector2.Zero;
- /// <summary>
- /// Sound to play after embedding into a hit target.
- /// </summary>
- [DataField, AutoNetworkedField]
- public SoundSpecifier? Sound;
- /// <summary>
- /// Uid of the entity the projectile is embed into.
- /// </summary>
- [DataField, AutoNetworkedField]
- public EntityUid? EmbeddedIntoUid;
- }
|