From 38d1605fc0a4ec0bb5bdf2825f93da8072584cfc Mon Sep 17 00:00:00 2001 From: xen-42 Date: Fri, 25 Apr 2025 11:55:30 -0400 Subject: [PATCH] Forgot these can use any collider shape, just needs to be a collider --- NewHorizons/Builder/Volumes/VanishVolumeBuilder.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/NewHorizons/Builder/Volumes/VanishVolumeBuilder.cs b/NewHorizons/Builder/Volumes/VanishVolumeBuilder.cs index 041bf942..cca70c4a 100644 --- a/NewHorizons/Builder/Volumes/VanishVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/VanishVolumeBuilder.cs @@ -8,20 +8,19 @@ namespace NewHorizons.Builder.Volumes { public static TVolume Make(GameObject planetGO, Sector sector, VanishVolumeInfo info) where TVolume : VanishVolume { - if (info.shape != null && (info.shape?.type != External.Modules.Props.ShapeType.Sphere || info.shape?.useShape == false)) + if (info.shape != null && info.shape?.useShape == false) { - NHLogger.LogError($"Destruction/VanishVolumes only support sphere colliders. Affects planet [{planetGO.name}]"); + NHLogger.LogError($"Destruction/VanishVolumes only support colliders. Affects planet [{planetGO.name}]. Set useShape to false."); } // VanishVolume is only compatible with sphere colliders - // If info.shape was null, it will still default to using info.radius, just make sure it does so with a collider + // If info.shape was null, it will still default to using a sphere with info.radius, just make sure it does so with a collider info.shape ??= new(); info.shape.useShape = false; - info.shape.type = External.Modules.Props.ShapeType.Sphere; var volume = VolumeBuilder.Make(planetGO, sector, info); - var collider = volume.gameObject.GetComponent(); + var collider = volume.gameObject.GetComponent(); volume._collider = collider; volume._shrinkBodies = info.shrinkBodies; volume._onlyAffectsPlayerAndShip = info.onlyAffectsPlayerRelatedBodies;