mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* Add Bipod System * Add the NT-3 * Small fixes * Small fixes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix Test Fails * Small oversight * Robust the Code * Fix Action Name Co-authored-by: Tobias Berger <toby@tobot.dev> Signed-off-by: Sir Warock <67167466+SirWarock@users.noreply.github.com> * Fix Action Description Co-authored-by: Tobias Berger <toby@tobot.dev> Signed-off-by: Sir Warock <67167466+SirWarock@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add WallPierce + Changes * Small fix * Cleanup * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix Testfail + Add Descriptions --------- Signed-off-by: Sir Warock <67167466+SirWarock@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tobias Berger <toby@tobot.dev> Co-authored-by: Vanessa <908648+ShepardToTheStars@users.noreply.github.com>
54 lines
1.8 KiB
C#
54 lines
1.8 KiB
C#
using Content.Shared.Tag;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server._DV.Projectiles.Components;
|
|
|
|
[RegisterComponent]
|
|
public sealed partial class PiercingProjectileComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The health threshold that a target has to supersede to block the projectile.
|
|
/// A normal wall has 200.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public float HealthThreshold;
|
|
|
|
/// <summary>
|
|
/// The number of entities it pierced.
|
|
/// It'll only count the entities with the <see cref="PierceBlockTag"/>.
|
|
/// </summary>
|
|
[DataField]
|
|
public float PierceCounter;
|
|
|
|
/// <summary>
|
|
/// The tag that will cause the piercing bullet to increment it's <see cref="PierceCounter"/>.
|
|
/// </summary>
|
|
[DataField]
|
|
public List<ProtoId<TagPrototype>> PierceBlockTag = ["Wall", "Window"];
|
|
|
|
/// <summary>
|
|
/// The number of entities it is allowed to pierce before being deleted.
|
|
/// When <see cref="PierceCounter"/> is higher than this number, it'll be deleted.
|
|
/// </summary>
|
|
/// <example>
|
|
/// A bullet with a MaxPierceNumberThreshold of 3 will pierce 3 entities with the <see cref="PierceBlockTag"/> and be deleted when hitting the fourth.
|
|
/// </example>
|
|
[DataField]
|
|
public float MaxPierceNumberThreshold = 1f;
|
|
|
|
/// <summary>
|
|
/// The cardinal direction that the bullet is flying toward.
|
|
/// </summary>
|
|
[DataField]
|
|
public Direction? Direction;
|
|
|
|
/// <summary>
|
|
/// The vertical/horizontal coordinate that will be ignored for <see cref="PierceCounter"/>.
|
|
/// </summary>
|
|
/// <example>
|
|
/// A bullet going positive Y hitting a wall at X 3 and Y 5 will not increment the <see cref="PierceCounter"/> when hitting other walls at Y 5.
|
|
/// </example>
|
|
[DataField]
|
|
public float? IgnoreRowCoordinate;
|
|
}
|