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

@@ -5,7 +5,6 @@ using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
using Timer = Robust.Shared.Timing.Timer;
namespace Content.Server.Singularity.Components
@@ -14,7 +13,7 @@ namespace Content.Server.Singularity.Components
{
public readonly ContainmentFieldGeneratorComponent Generator1;
public readonly ContainmentFieldGeneratorComponent Generator2;
private readonly List<IEntity> _fields = new();
private readonly List<EntityUid> _fields = new();
private int _sharedEnergyPool;
private readonly CancellationTokenSource _powerDecreaseCancellationTokenSource = new();
public int SharedEnergyPool
@@ -57,7 +56,7 @@ namespace Content.Server.Singularity.Components
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<ContainmentFieldComponent?>(newEnt, out var containmentFieldComponent))
{
Logger.Error("While creating Fields in ContainmentFieldConnection, a ContainmentField without a ContainmentFieldComponent was created. Deleting newly spawned ContainmentField...");
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) newEnt);
IoCManager.Resolve<IEntityManager>().DeleteEntity(newEnt);
continue;
}
@@ -72,7 +71,7 @@ namespace Content.Server.Singularity.Components
Timer.SpawnRepeating(1000, () => { SharedEnergyPool--;}, _powerDecreaseCancellationTokenSource.Token);
}
public bool CanRepell(IEntity toRepell)
public bool CanRepell(EntityUidtoRepell)
{
var powerNeeded = 1;
if (IoCManager.Resolve<IEntityManager>().TryGetComponent<ServerSingularityComponent?>(toRepell, out var singularityComponent))
@@ -88,7 +87,7 @@ namespace Content.Server.Singularity.Components
_powerDecreaseCancellationTokenSource.Cancel();
foreach (var field in _fields)
{
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) field);
IoCManager.Resolve<IEntityManager>().DeleteEntity(field);
}
_fields.Clear();