mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
1.24.1 (#977)
## Minor features - Item sockets now have "colliderRadius" so that you can make them actually work
This commit is contained in:
commit
31123b1053
@ -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<SphereCollider>().radius = info.colliderRadius;
|
||||
go.GetAddComponent<OWCollider>();
|
||||
}
|
||||
socketGO.SetActive(true);
|
||||
socket._socketTransform = socketGO.transform;
|
||||
}
|
||||
|
||||
@ -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.
|
||||
/// </summary>
|
||||
public string removalFact;
|
||||
/// <summary>
|
||||
/// Default collider radius when interacting with the socket
|
||||
/// </summary>
|
||||
[DefaultValue(0f)]
|
||||
public float colliderRadius = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -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" ],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user