diff --git a/Content.Shared/Construction/Conditions/EmptyOrWindowValidInTile.cs b/Content.Shared/Construction/Conditions/EmptyOrWindowValidInTile.cs index c6c7c47c70..5a70e145f6 100644 --- a/Content.Shared/Construction/Conditions/EmptyOrWindowValidInTile.cs +++ b/Content.Shared/Construction/Conditions/EmptyOrWindowValidInTile.cs @@ -13,9 +13,13 @@ namespace Content.Shared.Construction.Conditions public bool Condition(EntityUid user, EntityCoordinates location, Direction direction) { + var entManager = IoCManager.Resolve(); + var lookupSys = entManager.System(); + 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().HasComponent(entity)) result = true; diff --git a/Content.Shared/Construction/Conditions/NoWindowsInTile.cs b/Content.Shared/Construction/Conditions/NoWindowsInTile.cs index 2d37ecebe6..e241a1eea6 100644 --- a/Content.Shared/Construction/Conditions/NoWindowsInTile.cs +++ b/Content.Shared/Construction/Conditions/NoWindowsInTile.cs @@ -17,8 +17,9 @@ namespace Content.Shared.Construction.Conditions var entManager = IoCManager.Resolve(); var sysMan = entManager.EntitySysManager; var tagSystem = sysMan.GetEntitySystem(); + var lookupSys = sysMan.GetEntitySystem(); - foreach (var entity in location.GetEntitiesInTile(LookupFlags.Static)) + foreach (var entity in lookupSys.GetEntitiesIntersecting(location, LookupFlags.Static)) { if (tagSystem.HasTag(entity, WindowTag)) return false;