Split entity lookups from entity manager (#3747)

* Split entity lookups from entity manager

* IoC instead

* IoC refactor

* Fix bad resolve

* Remove EntityManager EntityLookup

* Update submodule

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2021-04-06 13:31:07 +10:00
committed by GitHub
parent 677706b117
commit 67f9e9cb5e
24 changed files with 50 additions and 44 deletions

View File

@@ -7,6 +7,7 @@ using Content.Shared.GameObjects.Components.Storage;
using Content.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Physics;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
@@ -102,11 +103,12 @@ namespace Content.Shared.GameObjects.Components.Disposal
{
if(_intersecting.Count == 0) return;
// TODO: Yeah look this sucks but we'll fix it someday.
for (var i = _intersecting.Count - 1; i >= 0; i--)
{
var entity = _intersecting[i];
if (!Owner.EntityManager.IsIntersecting(entity, Owner))
if (IoCManager.Resolve<IEntityLookup>().IsIntersecting(entity, Owner))
_intersecting.RemoveAt(i);
}
}