Skip to content

Commit

Permalink
Update CompArmorDurability.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
CMDR-Bill-Doors committed Aug 23, 2024
1 parent 06036a3 commit 6248166
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public override string CompInspectStringExtra()
public override void PostPreApplyDamage(ref DamageInfo dinfo, out bool absorbed)
{
base.PostPreApplyDamage(ref dinfo, out absorbed);
if (curDurability > 0)
if (curDurability > 0 && dinfo.Def.harmsHealth && dinfo.Def.ExternalViolenceFor(parent))
{
curDurability -= dinfo.Amount;
if (curDurability < 0)
Expand Down

0 comments on commit 6248166

Please sign in to comment.