Makes no sense to only add collider if socket path is null

This commit is contained in:
xen-42 2025-01-07 21:38:12 -05:00
parent 63672ea9fc
commit 9ca3ee31cc

View File

@ -143,14 +143,15 @@ namespace NewHorizons.Builder.Props
if (socket._socketTransform == null) if (socket._socketTransform == null)
{ {
var socketGO = GeneralPropBuilder.MakeNew("Socket", planetGO, sector, info, defaultParent: go.transform); var socketGO = GeneralPropBuilder.MakeNew("Socket", planetGO, sector, info, defaultParent: go.transform);
socketGO.SetActive(true);
socket._socketTransform = socketGO.transform;
}
if (info.colliderRadius > 0f) if (info.colliderRadius > 0f)
{ {
go.AddComponent<SphereCollider>().radius = info.colliderRadius; go.AddComponent<SphereCollider>().radius = info.colliderRadius;
go.GetAddComponent<OWCollider>(); go.GetAddComponent<OWCollider>();
} }
socketGO.SetActive(true);
socket._socketTransform = socketGO.transform;
}
socket.ItemType = itemType; socket.ItemType = itemType;
socket.UseGiveTakePrompts = info.useGiveTakePrompts; socket.UseGiveTakePrompts = info.useGiveTakePrompts;