diff --git a/NewHorizons/Builder/Props/ItemBuilder.cs b/NewHorizons/Builder/Props/ItemBuilder.cs index 2a678d58..5d4dc7ba 100644 --- a/NewHorizons/Builder/Props/ItemBuilder.cs +++ b/NewHorizons/Builder/Props/ItemBuilder.cs @@ -143,6 +143,11 @@ namespace NewHorizons.Builder.Props if (socket._socketTransform == null) { var socketGO = GeneralPropBuilder.MakeNew("Socket", planetGO, sector, info, defaultParent: go.transform); + if (info.colliderRadius > 0f) + { + go.AddComponent().radius = info.colliderRadius; + go.GetAddComponent(); + } socketGO.SetActive(true); socket._socketTransform = socketGO.transform; } diff --git a/NewHorizons/External/Modules/Props/Item/ItemSocketInfo.cs b/NewHorizons/External/Modules/Props/Item/ItemSocketInfo.cs index 76ac16f7..7294fbb0 100644 --- a/NewHorizons/External/Modules/Props/Item/ItemSocketInfo.cs +++ b/NewHorizons/External/Modules/Props/Item/ItemSocketInfo.cs @@ -1,13 +1,5 @@ -using NewHorizons.External.SerializableData; using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; namespace NewHorizons.External.Modules.Props.Item { @@ -54,5 +46,10 @@ namespace NewHorizons.External.Modules.Props.Item /// A ship log fact to reveal when removing an item from this socket, or when the socket is empty. /// public string removalFact; + /// + /// Default collider radius when interacting with the socket + /// + [DefaultValue(0f)] + public float colliderRadius = 0f; } } diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index e2eeede0..e15ce783 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -1642,6 +1642,12 @@ "removalFact": { "type": "string", "description": "A ship log fact to reveal when removing an item from this socket, or when the socket is empty." + }, + "colliderRadius": { + "type": "number", + "description": "Default collider radius when interacting with the socket", + "format": "float", + "default": 0.0 } } }, diff --git a/NewHorizons/manifest.json b/NewHorizons/manifest.json index d51e9c95..fea758fd 100644 --- a/NewHorizons/manifest.json +++ b/NewHorizons/manifest.json @@ -4,7 +4,7 @@ "author": "xen, Bwc9876, JohnCorby, MegaPiggy, Trifid, and friends", "name": "New Horizons", "uniqueName": "xen.NewHorizons", - "version": "1.24.0", + "version": "1.24.1", "owmlVersion": "2.12.1", "dependencies": [ "JohnCorby.VanillaFix", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ], "conflicts": [ "PacificEngine.OW_CommonResources" ],