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

View File

@@ -9,7 +9,6 @@ using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Broadphase;
using Robust.Shared.ViewVariables;
namespace Content.Server.Singularity.Components
@@ -63,7 +62,7 @@ namespace Content.Server.Singularity.Components
private Tuple<Direction, ContainmentFieldConnection>? _connection1;
private Tuple<Direction, ContainmentFieldConnection>? _connection2;
public bool CanRepell(IEntity toRepell) => _connection1?.Item2?.CanRepell(toRepell) == true ||
public bool CanRepell(EntityUidtoRepell) => _connection1?.Item2?.CanRepell(toRepell) == true ||
_connection2?.Item2?.CanRepell(toRepell) == true;
public void OnAnchoredChanged()

View File

@@ -2,15 +2,10 @@ using Content.Shared.Singularity;
using Content.Shared.Singularity.Components;
using Content.Shared.Sound;
using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Physics.Collision;
using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Player;
using Robust.Shared.Players;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Timing;
using Robust.Shared.ViewVariables;
namespace Content.Server.Singularity.Components
@@ -32,7 +27,7 @@ namespace Content.Server.Singularity.Components
_energy = value;
if (_energy <= 0)
{
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) Owner);
IoCManager.Resolve<IEntityManager>().DeleteEntity(Owner);
return;
}