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

@@ -19,6 +19,7 @@ using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.Enums;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Map;
using Robust.Shared.Network;
@@ -498,7 +499,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
if(_areaInsert && (eventArgs.Target == null || !eventArgs.Target.HasComponent<SharedItemComponent>()))
{
var validStorables = new List<IEntity>();
foreach (var entity in Owner.EntityManager.GetEntitiesInRange(eventArgs.ClickLocation, 1))
foreach (var entity in IoCManager.Resolve<IEntityLookup>().GetEntitiesInRange(eventArgs.ClickLocation, 1))
{
if (!entity.Transform.IsMapTransform
|| entity == eventArgs.User