diff --git a/NewHorizons/Builder/General/RigidBodyBuilder.cs b/NewHorizons/Builder/General/RigidBodyBuilder.cs index 5661d430..09a92c08 100644 --- a/NewHorizons/Builder/General/RigidBodyBuilder.cs +++ b/NewHorizons/Builder/General/RigidBodyBuilder.cs @@ -33,18 +33,16 @@ namespace NewHorizons.Builder.General owRigidBody.EnableKinematicSimulation(); rigidBody.mass = 10000; - if (config.Base.addPhysics) + if (config.Base.pushable) { // hack: make all mesh colliders convex // triggers are already convex - // prints errors for non readable meshes but whatever + // doesnt work for some non readable meshes but whatever foreach (var meshCollider in body.GetComponentsInChildren(true)) meshCollider.convex = true; - var shape = body.AddComponent(); - shape._collisionMode = Shape.CollisionMode.Detector; - shape._layerMask = (int)(Shape.Layer.Default | Shape.Layer.Gravity); - shape._radius = config.Base.surfaceSize; + // backup collider in case of no convex colliders + body.AddComponent().radius = config.Base.surfaceSize; var impactSensor = body.AddComponent(); var audioSource = body.AddComponent(); diff --git a/NewHorizons/Builder/Orbital/OrbitlineBuilder.cs b/NewHorizons/Builder/Orbital/OrbitlineBuilder.cs index fac2bfcf..a2ffbab0 100644 --- a/NewHorizons/Builder/Orbital/OrbitlineBuilder.cs +++ b/NewHorizons/Builder/Orbital/OrbitlineBuilder.cs @@ -84,7 +84,7 @@ namespace NewHorizons.Builder.Orbital Delay.FireOnNextUpdate(orbitLine.InitializeLineRenderer); // If the planet has physics and a regular orbit line, make sure that when it's bumped into the old orbit line vanishes - if (config.Base.addPhysics && !config.Orbit.trackingOrbitLine) + if (config.Base.pushable && !config.Orbit.trackingOrbitLine) { var impactSensor = planetGO.GetComponent(); impactSensor.OnImpact += (ImpactData _) => diff --git a/NewHorizons/Components/AddPhysics.cs b/NewHorizons/Components/AddPhysics.cs index c7671a50..4e9cf4a7 100644 --- a/NewHorizons/Components/AddPhysics.cs +++ b/NewHorizons/Components/AddPhysics.cs @@ -34,7 +34,7 @@ public class AddPhysics : MonoBehaviour // hack: make all mesh colliders convex // triggers are already convex - // prints errors for non readable meshes but whatever + // doesnt work for some non readable meshes but whatever foreach (var meshCollider in GetComponentsInChildren(true)) meshCollider.convex = true; diff --git a/NewHorizons/External/Modules/BaseModule.cs b/NewHorizons/External/Modules/BaseModule.cs index 03dbb51a..9d72301c 100644 --- a/NewHorizons/External/Modules/BaseModule.cs +++ b/NewHorizons/External/Modules/BaseModule.cs @@ -77,7 +77,7 @@ namespace NewHorizons.External.Modules /// This is meant for stuff like satellites which are relatively simple and can be de-orbited. /// If you are using an orbit line but a tracking line, it will be removed when the planet is bumped in to. /// - public bool addPhysics; + public bool pushable; #region Obsolete diff --git a/NewHorizons/Main.cs b/NewHorizons/Main.cs index f2aa10b9..2906f9be 100644 --- a/NewHorizons/Main.cs +++ b/NewHorizons/Main.cs @@ -622,8 +622,6 @@ namespace NewHorizons { try { - if (mod.ModHelper.Manifest.Filename.Contains("Extinction")) return; - if (_firstLoad) { MountedAddons.Add(mod); diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 843e9478..faf9e1e9 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -574,7 +574,7 @@ "format": "int32", "default": 0 }, - "addPhysics": { + "pushable": { "type": "boolean", "description": "Apply physics to this planet when you bump into it. Will have a spherical collider the size of surfaceSize. \nFor custom colliders they have to all be convex and you can leave surface size as 0.\nThis is meant for stuff like satellites which are relatively simple and can be de-orbited.\nIf you are using an orbit line but a tracking line, it will be removed when the planet is bumped in to." } diff --git a/NewHorizons/manifest.json b/NewHorizons/manifest.json index 2fb8ac31..32642e86 100644 --- a/NewHorizons/manifest.json +++ b/NewHorizons/manifest.json @@ -4,7 +4,7 @@ "author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book", "name": "New Horizons", "uniqueName": "xen.NewHorizons", - "version": "1.14.1", + "version": "1.14.2", "owmlVersion": "2.9.3", "dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ], "conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],