Files
OldThink/Content.Shared/Projectiles/EmbeddableProjectileComponent.cs

44 lines
1.4 KiB
C#
Raw Normal View History

using System.Numerics;
using Robust.Shared.Audio;
2023-05-27 14:15:15 +10:00
using Robust.Shared.GameStates;
namespace Content.Shared.Projectiles;
2023-05-27 14:15:15 +10:00
/// <summary>
/// Embeds this entity inside of the hit target.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class EmbeddableProjectileComponent : Component
2023-05-27 14:15:15 +10:00
{
/// <summary>
/// Minimum speed of the projectile to embed.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("minimumSpeed"), AutoNetworkedField]
public float MinimumSpeed = 5f;
2023-05-27 14:15:15 +10:00
/// <summary>
/// Delete the entity on embedded removal?
/// Does nothing if there's no RemovalTime.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("deleteOnRemove"), AutoNetworkedField]
public bool DeleteOnRemove;
/// <summary>
/// How long it takes to remove the embedded object.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("removalTime"), AutoNetworkedField]
public float? RemovalTime = 3f;
/// <summary>
/// How far into the entity should we offset (0 is wherever we collided).
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("offset"), AutoNetworkedField]
public Vector2 Offset = Vector2.Zero;
/// <summary>
/// Sound to play after embedding into a hit target.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("sound"), AutoNetworkedField]
public SoundSpecifier? Sound;
2023-05-27 14:15:15 +10:00
}