Fix 3000 errors
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user