mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Revert "add the delay back out of fear"
This reverts commit 882b5c457121801fde6b3f19cbde4f21ba05bc38.
This commit is contained in:
parent
d7c30a9892
commit
d0d72780f1
@ -262,25 +262,22 @@ namespace NewHorizons.Handlers
|
|||||||
|
|
||||||
if (body.Config.removeChildren != null)
|
if (body.Config.removeChildren != null)
|
||||||
{
|
{
|
||||||
Delay.FireInNUpdates(() =>
|
var goPath = go.transform.GetPath();
|
||||||
|
var transforms = go.GetComponentsInChildren<Transform>(true);
|
||||||
|
foreach (var childPath in body.Config.removeChildren)
|
||||||
{
|
{
|
||||||
var goPath = go.transform.GetPath();
|
// Multiple children can have the same path so we delete all that match
|
||||||
var transforms = go.GetComponentsInChildren<Transform>(true);
|
var path = $"{goPath}/{childPath}";
|
||||||
foreach (var childPath in body.Config.removeChildren)
|
|
||||||
|
var flag = true;
|
||||||
|
foreach (var childObj in transforms.Where(x => x.GetPath() == path))
|
||||||
{
|
{
|
||||||
// Multiple children can have the same path so we delete all that match
|
flag = false;
|
||||||
var path = $"{goPath}/{childPath}";
|
childObj.gameObject.SetActive(false);
|
||||||
|
|
||||||
var flag = true;
|
|
||||||
foreach (var childObj in transforms.Where(x => x.GetPath() == path))
|
|
||||||
{
|
|
||||||
flag = false;
|
|
||||||
childObj.gameObject.SetActive(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag) Logger.LogWarning($"Couldn't find \"{childPath}\".");
|
|
||||||
}
|
}
|
||||||
}, 2);
|
|
||||||
|
if (flag) Logger.LogWarning($"Couldn't find \"{childPath}\".");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do stuff that's shared between generating new planets and updating old ones
|
// Do stuff that's shared between generating new planets and updating old ones
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user