add all da sun station debris instead of just the first one

This commit is contained in:
JohnCorby 2022-05-22 13:07:22 -07:00
parent b130387bc6
commit d2009f7637

View File

@ -131,7 +131,8 @@ namespace NewHorizons.Utility
case AstroObject.Name.CustomString: case AstroObject.Name.CustomString:
if (primary._customName.Equals("Sun Station")) if (primary._customName.Equals("Sun Station"))
{ {
otherChildren.Add(GameObject.Find("SS_Debris_Body")); // there are multiple debris with the same name
otherChildren.AddRange(GameObject.FindObjectsOfType<GameObject>().Where(x => x.name == "SS_Debris_Body"));
} }
break; break;
default: default: