mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Merge branch 'fix-751' into prometheus
This commit is contained in:
commit
e701e21881
@ -14,6 +14,7 @@ using OWML.Common;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using NewHorizons.External.Modules.Props;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace NewHorizons.Builder.Props
|
namespace NewHorizons.Builder.Props
|
||||||
|
|||||||
@ -8,6 +8,7 @@ using NewHorizons.Utility.OWML;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using NewHorizons.External.Modules.Props;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace NewHorizons.Builder.Props
|
namespace NewHorizons.Builder.Props
|
||||||
@ -110,7 +111,6 @@ namespace NewHorizons.Builder.Props
|
|||||||
lightning.SetActive(true);
|
lightning.SetActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Socket groups that have an equal number of props and sockets
|
|
||||||
// Nice to have: socket groups that specify a filledSocketObject and an emptySocketObject (eg the archway in the giant's deep tower)
|
// Nice to have: socket groups that specify a filledSocketObject and an emptySocketObject (eg the archway in the giant's deep tower)
|
||||||
public static void MakeSocketGroup(GameObject planetGO, Sector sector, SocketQuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
public static void MakeSocketGroup(GameObject planetGO, Sector sector, SocketQuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
||||||
{
|
{
|
||||||
@ -144,12 +144,14 @@ namespace NewHorizons.Builder.Props
|
|||||||
foreach (var prop in propsInGroup)
|
foreach (var prop in propsInGroup)
|
||||||
{
|
{
|
||||||
prop.SetActive(false);
|
prop.SetActive(false);
|
||||||
|
|
||||||
var quantumObject = prop.AddComponent<SocketedQuantumObject>();
|
var quantumObject = prop.AddComponent<SocketedQuantumObject>();
|
||||||
quantumObject._socketRoot = groupRoot;
|
quantumObject._socketRoot = groupRoot;
|
||||||
quantumObject._socketList = sockets.ToList();
|
quantumObject._socketList = sockets.ToList();
|
||||||
quantumObject._sockets = sockets;
|
quantumObject._sockets = sockets;
|
||||||
quantumObject._prebuilt = true;
|
quantumObject._prebuilt = true;
|
||||||
|
quantumObject._alignWithSocket = !prop.detail.quantumAlignWithGravity;
|
||||||
|
quantumObject._randomYRotation = prop.detail.quantumRandomizeYRotation;
|
||||||
|
quantumObject._alignWithGravity = prop.detail.quantumAlignWithGravity;
|
||||||
quantumObject._childSockets = new List<QuantumSocket>();
|
quantumObject._childSockets = new List<QuantumSocket>();
|
||||||
// TODO: support _alignWithGravity?
|
// TODO: support _alignWithGravity?
|
||||||
if (prop.GetComponentInChildren<VisibilityTracker>() == null)
|
if (prop.GetComponentInChildren<VisibilityTracker>() == null)
|
||||||
|
|||||||
10
NewHorizons/External/Modules/Props/DetailInfo.cs
vendored
10
NewHorizons/External/Modules/Props/DetailInfo.cs
vendored
@ -53,6 +53,16 @@ namespace NewHorizons.External.Modules.Props
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string quantumGroupID;
|
public string quantumGroupID;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If this prop is quantum, and the quantum group is socketed, this field determines whether the prop will randomly choose a Y rotation when moving to a socket.
|
||||||
|
/// </summary>
|
||||||
|
[DefaultValue(true)] public bool quantumRandomizeYRotation = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If this prop is quantum, and the quantum group is socketed, this field determines whether the prop will align with the GravityVolume (true) or align with the current socket (false).
|
||||||
|
/// </summary>
|
||||||
|
[DefaultValue(true)] public bool quantumAlignWithGravity = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Should this detail stay loaded (visible and collideable) even if you're outside the sector (good for very large props)?
|
/// Should this detail stay loaded (visible and collideable) even if you're outside the sector (good for very large props)?
|
||||||
/// Also makes this detail visible on the map.
|
/// Also makes this detail visible on the map.
|
||||||
|
|||||||
@ -1472,6 +1472,16 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "If this value is not null, this prop will be quantum. Assign this field to the id of the quantum group it should be a part of. The group it is assigned to determines what kind of quantum object it is"
|
"description": "If this value is not null, this prop will be quantum. Assign this field to the id of the quantum group it should be a part of. The group it is assigned to determines what kind of quantum object it is"
|
||||||
},
|
},
|
||||||
|
"quantumRandomizeYRotation": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "If this prop is quantum, and the quantum group is socketed, this field determines whether the prop will randomly choose a Y rotation when moving to a socket.",
|
||||||
|
"default": true
|
||||||
|
},
|
||||||
|
"quantumAlignWithGravity": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "If this prop is quantum, and the quantum group is socketed, this field determines whether the prop will align with the GravityVolume (true) or align with the current socket (false).",
|
||||||
|
"default": true
|
||||||
|
},
|
||||||
"keepLoaded": {
|
"keepLoaded": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Should this detail stay loaded (visible and collideable) even if you're outside the sector (good for very large props)?\nAlso makes this detail visible on the map.\nKeeping many props loaded is bad for performance so use this only when it's actually relevant\nMost logic/behavior scripts will still only work inside the sector, as most of those scripts break if a sector is not provided."
|
"description": "Should this detail stay loaded (visible and collideable) even if you're outside the sector (good for very large props)?\nAlso makes this detail visible on the map.\nKeeping many props loaded is bad for performance so use this only when it's actually relevant\nMost logic/behavior scripts will still only work inside the sector, as most of those scripts break if a sector is not provided."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user