Fix 3000 errors

This commit is contained in:
DrSmugleaf
2021-12-05 18:09:01 +01:00
parent 2bfec7ec62
commit 2a3b7d809d
569 changed files with 2979 additions and 3280 deletions

View File

@@ -1,7 +1,6 @@
using Content.Server.Administration.Logs;
using Content.Server.Camera;
using Content.Server.Projectiles.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Body.Components;
using Content.Shared.Damage;
using Content.Shared.Database;
@@ -57,7 +56,7 @@ namespace Content.Server.Projectiles
var dmg = _damageableSystem.TryChangeDamage(otherEntity, component.Damage);
component.DamagedEntity = true;
if (dmg is not null && EntityManager.TryGetEntity(component.Shooter, out var shooter))
if (dmg is not null && EntityManager.EntityExists(component.Shooter)
_adminLogSystem.Add(LogType.BulletHit, LogImpact.Low,
$"Projectile {component.Owner} shot by {shooter} hit {otherEntity} and dealt {dmg.Total} damage");
}
@@ -83,7 +82,7 @@ namespace Content.Server.Projectiles
if (component.TimeLeft <= 0)
{
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) component.Owner);
IoCManager.Resolve<IEntityManager>().DeleteEntity(component.Owner);
}
}
}