mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Merge branch 'ghost-bird' of https://github.com/Outer-Wilds-New-Horizons/new-horizons into ghost-bird
This commit is contained in:
commit
53d5ce14f5
@ -339,14 +339,6 @@ namespace NewHorizons.Builder.Props
|
|||||||
component.gameObject.layer = Layer.IgnoreSun;
|
component.gameObject.layer = Layer.IgnoreSun;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Else it spams a ton of NRE, happens when you try to put a non-hostile Ghostbird
|
|
||||||
else if (component is GhostIK or GhostEffects)
|
|
||||||
{
|
|
||||||
// For when somebody (pikmin) makes a Unity ghost bird
|
|
||||||
if (component.transform.parent.GetComponent<GhostBrain>() == null)
|
|
||||||
UnityEngine.Object.DestroyImmediate(component);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (component is DarkMatterVolume)
|
else if (component is DarkMatterVolume)
|
||||||
{
|
{
|
||||||
var probeVisuals = component.gameObject.transform.Find("ProbeVisuals");
|
var probeVisuals = component.gameObject.transform.Find("ProbeVisuals");
|
||||||
@ -402,8 +394,15 @@ namespace NewHorizons.Builder.Props
|
|||||||
else if (component is Renderer renderer && component.gameObject.GetComponent<ElectricityEffect>() == null) renderer.enabled = true;
|
else if (component is Renderer renderer && component.gameObject.GetComponent<ElectricityEffect>() == null) renderer.enabled = true;
|
||||||
else if(component is Shape shape) shape.enabled = true;
|
else if(component is Shape shape) shape.enabled = true;
|
||||||
|
|
||||||
// If it's not a moving anglerfish make sure the anim controller is regular
|
// If it's not a moving ghostbird (ie Prefab_IP_GhostBird/Ghostbird_IP_ANIM) make sure it doesnt spam NREs
|
||||||
else if(component is AnglerfishAnimController && component.transform.parent.GetComponent<AnglerfishController>() == null) //Manual parent chain so we can find inactive
|
// Manual parent chain so we can find inactive
|
||||||
|
else if (component is GhostIK or GhostEffects && component.transform.parent.GetComponent<GhostBrain>() == null)
|
||||||
|
{
|
||||||
|
UnityEngine.Object.DestroyImmediate(component);
|
||||||
|
}
|
||||||
|
// If it's not a moving anglerfish (ie Anglerfish_Body/Beast_Anglerfish) make sure the anim controller is regular
|
||||||
|
// Manual parent chain so we can find inactive
|
||||||
|
else if(component is AnglerfishAnimController && component.transform.parent.GetComponent<AnglerfishController>() == null)
|
||||||
{
|
{
|
||||||
component.gameObject.AddComponent<AnglerAnimFixer>();
|
component.gameObject.AddComponent<AnglerAnimFixer>();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user