Replace GetEntitiesInTile with EntityLookupSystem equivalent (#36756)
* commit GET!! * minor cleanup
This commit is contained in:
@@ -13,9 +13,13 @@ namespace Content.Shared.Construction.Conditions
|
||||
|
||||
public bool Condition(EntityUid user, EntityCoordinates location, Direction direction)
|
||||
{
|
||||
var entManager = IoCManager.Resolve<IEntityManager>();
|
||||
var lookupSys = entManager.System<EntityLookupSystem>();
|
||||
|
||||
var result = false;
|
||||
|
||||
foreach (var entity in location.GetEntitiesInTile(LookupFlags.Approximate | LookupFlags.Static))
|
||||
|
||||
foreach (var entity in lookupSys.GetEntitiesIntersecting(location, LookupFlags.Approximate | LookupFlags.Static))
|
||||
{
|
||||
if (IoCManager.Resolve<IEntityManager>().HasComponent<SharedCanBuildWindowOnTopComponent>(entity))
|
||||
result = true;
|
||||
|
||||
Reference in New Issue
Block a user