Modify damage logging. (#5579)

This commit is contained in:
Leon Friedrich
2021-11-29 02:34:44 +13:00
committed by GitHub
parent b807250021
commit 0de4b7bc9f
28 changed files with 265 additions and 62 deletions

View File

@@ -57,9 +57,8 @@ namespace Content.Server.Projectiles
component.DamagedEntity = true;
if (dmg is not null && EntityManager.TryGetEntity(component.Shooter, out var shooter))
_adminLogSystem.Add(LogType.BulletHit, LogImpact.Low, $"Bullet shot by {shooter} hit {otherEntity}");
// "DamagedEntity" is misleading. Hit entity may be more accurate, as the damage may have been resisted
// by resistance sets.
_adminLogSystem.Add(LogType.BulletHit, LogImpact.Low,
$"Projectile {component.Owner} shot by {shooter} hit {otherEntity} and dealt {dmg.Total} damage");
}
// Damaging it can delete it