using System; using System.Collections.Generic; using System.Linq; using Nexus.API; using VRageMath; namespace Global { public static class NexusIntegration { public static Guid NexusId = new Guid("28a12184-0422-43ba-a6e6-2e228611cca5"); public static bool EnableNexusIntegration; public static void Load() { EnableNexusIntegration = true; } public static List GetSectors(BoundingSphereD sphereD) { if (!EnableNexusIntegration) return new List(); return (from sector in NexusAPI.GetSectors() let sectorSphere = new BoundingSphereD(sector.Center, sector.Radius) where sectorSphere.Intersects(sphereD) select sector).ToList(); } } }