Don't log empty radiation/explosion damage (#5610)

This commit is contained in:
wrexbe
2021-11-28 22:26:10 -08:00
committed by GitHub
parent d0c5d72d47
commit eab5c8c2ad

View File

@@ -98,7 +98,7 @@ namespace Content.Shared.Damage
var actual = EntitySystem.Get<DamageableSystem>().TryChangeDamage(OwnerUid, damage);
// should logging be disabled during rad storms? a lot of entities are going to be damaged.
if (actual != null)
if (actual != null && !actual.Empty)
EntitySystem.Get<SharedAdminLogSystem>().Add(LogType.Radiation, $"{Owner} took {actual.Total} radiation damage");
}
@@ -123,7 +123,7 @@ namespace Content.Shared.Damage
var actual = EntitySystem.Get<DamageableSystem>().TryChangeDamage(OwnerUid, damage);
// will logging handle nukes?
if (actual != null)
if (actual != null && !actual.Empty)
EntitySystem.Get<SharedAdminLogSystem>().Add(LogType.Explosion, $"{Owner} took {actual.Total} explosion damage");
}
}