diff --git a/Content.Shared/Projectiles/CanPenetrateComponent.cs b/Content.Shared/Projectiles/CanPenetrateComponent.cs deleted file mode 100644 index 6134978b1b..0000000000 --- a/Content.Shared/Projectiles/CanPenetrateComponent.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Content.Shared.FixedPoint; -using Content.Shared.Physics; -using Robust.Shared.GameStates; - -namespace Content.Shared.Projectiles; - -[RegisterComponent, NetworkedComponent] -public sealed partial class CanPenetrateComponent : Component -{ - /// - /// Should the projectile keep the ability to deal damage after colliding. - /// - [DataField] - public bool DamageAfterCollide = true; - - /// - /// The CollisionLayer, up to and including the one set, the projectile is allowed to penetrate. - /// - /// - /// Can penetrate everything if this value is not set. - /// - [DataField] - public CollisionGroup? PenetrationLayer; - - /// - /// How many times the projectile is allowed to deal damage. - /// - /// - /// Can deal damage on every collision if this value is not set. - /// - [DataField] - public float? PenetrationPower; - - /// - /// Modifies the damage of a projectile after it has penetrated an entity. - /// - /// - /// Won't modify the projectile's damage if this value is not set. - /// - [DataField] - public FixedPoint2? DamageModifier; -} diff --git a/Content.Shared/Projectiles/SharedProjectileSystem.cs b/Content.Shared/Projectiles/SharedProjectileSystem.cs index 2fa5ee1c8c..f57e873653 100644 --- a/Content.Shared/Projectiles/SharedProjectileSystem.cs +++ b/Content.Shared/Projectiles/SharedProjectileSystem.cs @@ -169,33 +169,6 @@ public abstract partial class SharedProjectileSystem : EntitySystem /// private void AfterProjectileHit(EntityUid uid, ProjectileComponent component, ref AfterProjectileHitEvent args) { - if (!TryComp(uid, out var damageAfterCollide)) - return; - - //Delete the projectile if it hits an entity with a CollisionLayer that has a higher value than it's PenetrationLayer. - //This allows a projectile to only penetrate a specific set of entities. - if (damageAfterCollide.PenetrationLayer != null) - { - if (args.Fixture.CollisionLayer > (int) damageAfterCollide.PenetrationLayer || - damageAfterCollide.PenetrationPower == 0) - { - QueueDel(uid); - return; - } - } - - //Allow the projectile to deal damage again. - if(damageAfterCollide.DamageAfterCollide) - component.DamagedEntity = false; - - //If the projectile has a limit on the amount of penetrations, reduce it. - if (damageAfterCollide.PenetrationPower != null) - damageAfterCollide.PenetrationPower -= 1; - - //Apply the penetration damage modifier if the projectile has one. - if (damageAfterCollide.DamageModifier != null) - component.Damage *= damageAfterCollide.DamageModifier.Value; - //Overrides the original DeleteOnCollide if the projectile passes all penetration checks. //This is to prevent having to set DeleteOnCollide to false on every prototype //you want to give the ability to penetrate entities. diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/grenade.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/grenade.yml index ec62121c6b..7f0507d686 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/grenade.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/grenade.yml @@ -12,8 +12,6 @@ damage: types: Blunt: 4 - - type: CanPenetrate - penetrationLayer: MobLayer - type: StaminaDamageOnCollide damage: 55 - type: TimedDespawn @@ -33,8 +31,6 @@ damage: types: Piercing: 45 - - type: CanPenetrate - penetrationLayer: MobLayer - type: TimedDespawn lifetime: 0.25 @@ -53,8 +49,6 @@ types: Blunt: 1 Heat: 2 - - type: CanPenetrate - penetrationLayer: MobLayer - type: IgniteOnCollide fireStacks: 3 count: 10 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml index a5b0a8ffa3..9445a3cfe1 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml @@ -738,7 +738,7 @@ - type: PointLight radius: 3.5 color: blue - energy: 0.5 + energy: 0.5 - type: entity id: BulletCap @@ -810,8 +810,6 @@ mask: - Impassable - BulletImpassable - - type: CanPenetrate - penetrationLayer: MobLayer - type: Vapor active: true - type: Appearance diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/PA/particles.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/PA/particles.yml index 8f89c900ca..8d889ee5cb 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/PA/particles.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/PA/particles.yml @@ -19,7 +19,6 @@ damage: types: Radiation: 25 - - type: CanPenetrate - type: Physics - type: Fixtures fixtures: