private bool IsAnyNodeOutsideOfNetworkRange(IEnumerable <IPBSObject> pbsObjects, PBSDockingBase pbsDockingBase) { foreach (var pbsObject in pbsObjects) { var unit = (Unit)pbsObject; if (PBSHelper.IsPlaceableOutsideOfBase((unit.ED.CategoryFlags))) { continue; } if (!unit.CurrentPosition.IsInRangeOf2D(pbsDockingBase.CurrentPosition, pbsDockingBase.GetNetworkNodeRange())) { return(true); } } return(false); }