mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
add the delay back out of fear
This commit is contained in:
parent
93e35ddc97
commit
882b5c4571
@ -275,22 +275,25 @@ namespace NewHorizons.Handlers
|
|||||||
|
|
||||||
if (body.Config.removeChildren != null)
|
if (body.Config.removeChildren != null)
|
||||||
{
|
{
|
||||||
var goPath = go.transform.GetPath();
|
Delay.FireInNUpdates(() =>
|
||||||
var transforms = go.GetComponentsInChildren<Transform>(true);
|
|
||||||
foreach (var childPath in body.Config.removeChildren)
|
|
||||||
{
|
{
|
||||||
// Multiple children can have the same path so we delete all that match
|
var goPath = go.transform.GetPath();
|
||||||
var path = $"{goPath}/{childPath}";
|
var transforms = go.GetComponentsInChildren<Transform>(true);
|
||||||
|
foreach (var childPath in body.Config.removeChildren)
|
||||||
var flag = true;
|
|
||||||
foreach (var childObj in transforms.Where(x => x.GetPath() == path))
|
|
||||||
{
|
{
|
||||||
flag = false;
|
// Multiple children can have the same path so we delete all that match
|
||||||
childObj.gameObject.SetActive(false);
|
var path = $"{goPath}/{childPath}";
|
||||||
}
|
|
||||||
|
|
||||||
if (flag) Logger.LogWarning($"Couldn't find \"{childPath}\".");
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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