mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Comment what SimplifiedDetailInfo is and change title scene handler remove children to use findall
This commit is contained in:
parent
731bd64bdf
commit
899e66e7ed
@ -210,6 +210,7 @@ namespace NewHorizons.Builder.Body
|
||||
{
|
||||
foreach (var detailInfo in body.Config.Props.proxyDetails)
|
||||
{
|
||||
// Thought about switching these to SimplifiedDetailInfo but we use AlignRadial with these so we can't
|
||||
DetailBuilder.Make(proxy, null, body.Mod, detailInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,9 @@ using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props
|
||||
{
|
||||
/// <summary>
|
||||
/// A lesser form of DetailInfo used for the title screen since that supports fewer features
|
||||
/// </summary>
|
||||
[JsonObject]
|
||||
public class SimplifiedDetailInfo : GeneralPropInfo
|
||||
{
|
||||
|
||||
@ -202,15 +202,10 @@ namespace NewHorizons.Handlers
|
||||
|
||||
private static void RemoveChildren(GameObject go, string[] paths)
|
||||
{
|
||||
var goPath = go.transform.GetPath();
|
||||
var transforms = go.GetComponentsInChildren<Transform>(true);
|
||||
foreach (var childPath in paths)
|
||||
{
|
||||
// Multiple children can have the same path so we delete all that match
|
||||
var path = $"{goPath}/{childPath}";
|
||||
|
||||
var flag = true;
|
||||
foreach (var childObj in transforms.Where(x => x.GetPath() == path))
|
||||
foreach (var childObj in go.transform.FindAll(childPath))
|
||||
{
|
||||
flag = false;
|
||||
// idk why we wait here but we do
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user