Files
QuartZ-dump/GlobalTorch/NexusIntegration.cs
2024-12-29 21:15:58 +01:00

28 lines
830 B
C#

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<NexusAPI.Sector> GetSectors(BoundingSphereD sphereD)
{
if (!EnableNexusIntegration) return new List<NexusAPI.Sector>();
return (from sector in NexusAPI.GetSectors()
let sectorSphere = new BoundingSphereD(sector.Center, sector.Radius)
where sectorSphere.Intersects(sphereD)
select sector).ToList();
}
}
}