Merge branch 'random-fixes' of https://github.com/Outer-Wilds-New-Horizons/new-horizons into random-fixes

This commit is contained in:
Nick 2022-09-30 22:47:09 -04:00
commit f0c24dc93e
2 changed files with 11 additions and 4 deletions

View File

@ -101,8 +101,6 @@ namespace NewHorizons.Builder.Props
prop.transform.localScale = detail.stretch ?? (detail.scale != 0 ? Vector3.one * detail.scale : prefab.transform.localScale);
if (!detail.keepLoaded) GroupsBuilder.Make(prop, sector);
if (detail.removeChildren != null)
{
var detailPath = prop.transform.GetPath();
@ -158,6 +156,7 @@ namespace NewHorizons.Builder.Props
}
}
if (!detail.keepLoaded) GroupsBuilder.Make(prop, sector);
prop.SetActive(true);
return prop;

View File

@ -48,7 +48,11 @@ namespace NewHorizons.Builder.Props
private static void InitPrefabs()
{
// Just take every scroll and get the first arc
var existingArcs = GameObject.FindObjectsOfType<ScrollItem>().Select(x => x?._nomaiWallText?.gameObject?.transform?.Find("Arc 1")?.gameObject).Where(x => x != null).ToArray();
var existingArcs = GameObject.FindObjectsOfType<ScrollItem>()
.Select(x => x?._nomaiWallText?.gameObject?.transform?.Find("Arc 1")?.gameObject)
.Where(x => x != null)
.OrderBy(x => x.transform.GetPath())
.ToArray();
_arcPrefabs = new List<GameObject>();
_childArcPrefabs = new List<GameObject>();
foreach (var existingArc in existingArcs)
@ -67,7 +71,11 @@ namespace NewHorizons.Builder.Props
}
}
var existingGhostArcs = GameObject.FindObjectsOfType<GhostWallText>().Select(x => x?._textLine?.gameObject).Where(x => x != null).ToArray();
var existingGhostArcs = GameObject.FindObjectsOfType<GhostWallText>()
.Select(x => x?._textLine?.gameObject)
.Where(x => x != null)
.OrderBy(x => x.transform.GetPath())
.ToArray();
_ghostArcPrefabs = new List<GameObject>();
foreach (var existingArc in existingGhostArcs)
{