public List <PseudoPart> GetPseudoParts() { List <PseudoPart> retList = new List <PseudoPart>(); ConfigNode[] partNodes = shipNode.GetNodes("PART"); // KCTDebug.Log("partNodes count: " + partNodes.Length); foreach (ConfigNode CN in partNodes) { string name = CN.GetValue("part"); string pID = ""; if (name != null) { string[] split = name.Split('_'); name = split[0]; pID = split[1]; } else { name = CN.GetValue("name"); pID = CN.GetValue("uid"); } //for (int i = 0; i < split.Length - 1; i++) // pName += split[i]; PseudoPart returnPart = new PseudoPart(name, pID); retList.Add(returnPart); } return(retList); }