Files
tbd-station-14/Content.Shared/Projectiles/CanPenetrateComponent.cs
Arendian 04a8761bb6 decelerator nerf and projectile penetration mini refactor (#24032)
* decelerator nerf and projectile fix

* datafield name difference

* forgot to add component

* missed datafield styling

* comment made summary

* CanPenetrateComponent and CollisionLayer check.

* Small comment changes
2024-01-14 15:39:09 -08:00

43 lines
1.3 KiB
C#

using Content.Shared.FixedPoint;
using Content.Shared.Physics;
using Robust.Shared.GameStates;
namespace Content.Shared.Projectiles;
[RegisterComponent, NetworkedComponent]
public sealed partial class CanPenetrateComponent : Component
{
/// <summary>
/// Should the projectile keep the ability to deal damage after colliding.
/// </summary>
[DataField]
public bool DamageAfterCollide = true;
/// <summary>
/// The CollisionLayer, up to and including the one set, the projectile is allowed to penetrate.
/// </summary>
///<remarks>
/// Can penetrate everything if this value is not set.
/// </remarks>
[DataField]
public CollisionGroup? PenetrationLayer;
/// <summary>
/// How many times the projectile is allowed to deal damage.
/// </summary>
/// <remarks>
/// Can deal damage on every collision if this value is not set.
/// </remarks>
[DataField]
public float? PenetrationPower;
/// <summary>
/// Modifies the damage of a projectile after it has penetrated an entity.
/// </summary>
/// <remarks>
/// Won't modify the projectile's damage if this value is not set.
/// </remarks>
[DataField]
public FixedPoint2? DamageModifier;
}