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) { FakePart p = new FakePart(); ConfigNode.LoadObjectFromConfig(p, CN); string pName = ""; string[] split = p.part.Split('_'); for (int i = 0; i < split.Length - 1; i++) { pName += split[i]; } PseudoPart returnPart = new PseudoPart(pName, split[split.Length - 1]); retList.Add(returnPart); } return(retList); }
public List<PseudoPart> GetPseudoParts() { List<PseudoPart> retList = new List<PseudoPart>(); ConfigNode[] partNodes = shipNode.GetNodes("PART"); // Debug.Log("[KCT] partNodes count: " + partNodes.Length); foreach (ConfigNode CN in partNodes) { FakePart p = new FakePart(); ConfigNode.LoadObjectFromConfig(p, CN); string pName = ""; string[] split = p.part.Split('_'); for (int i = 0; i < split.Length - 1; i++) pName += split[i]; PseudoPart returnPart = new PseudoPart(pName, split[split.Length - 1]); retList.Add(returnPart); //Debug.Log("[KCT] " + pName); } return retList; }
public List<String> GetPartNames() { List<String> retList = new List<String>(); ConfigNode[] partNodes = shipNode.GetNodes("PART"); // Debug.Log("[KCT] partNodes count: " + partNodes.Length); foreach (ConfigNode CN in partNodes) { FakePart p = new FakePart(); ConfigNode.LoadObjectFromConfig(p, CN); string pName = ""; for (int i = 0; i < p.part.Split('_').Length-1; i++ ) pName += p.part.Split('_')[i]; retList.Add(pName); //Debug.Log("[KCT] " + pName); } return retList; }