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

@@ -47,7 +47,7 @@ namespace Content.Server.Projectiles.Components
[DataField("soundHitWall")]
private SoundSpecifier _soundHitWall = new SoundPathSpecifier("/Audio/Weapons/Guns/Hits/laser_sear_wall.ogg");
public void FireEffects(IEntity user, float distance, Angle angle, IEntity? hitEntity = null)
public void FireEffects(EntityUid user, float distance, Angle angle, EntityUid hitEntity = null)
{
var effectSystem = EntitySystem.Get<EffectSystem>();
_startTime = _gameTiming.CurTime;
@@ -98,7 +98,7 @@ namespace Content.Server.Projectiles.Components
{
if (!((!IoCManager.Resolve<IEntityManager>().EntityExists(Owner) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(Owner).EntityLifeStage) >= EntityLifeStage.Deleted))
{
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) Owner);
IoCManager.Resolve<IEntityManager>().DeleteEntity(Owner);
}
});
}

View File

@@ -1,9 +1,7 @@
using System.Collections.Generic;
using Content.Shared.Damage;
using Content.Shared.Projectiles;
using Content.Shared.Sound;
using Robust.Shared.GameObjects;
using Robust.Shared.Players;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
@@ -32,7 +30,7 @@ namespace Content.Server.Projectiles.Components
/// Function that makes the collision of this object ignore a specific entity so we don't collide with ourselves
/// </summary>
/// <param name="shooter"></param>
public void IgnoreEntity(IEntity shooter)
public void IgnoreEntity(EntityUid shooter)
{
Shooter = shooter;
Dirty();

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);
}
}
}