Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public List <PseudoPart> GetPseudoParts()
        {
            List <PseudoPart> retList = new List <PseudoPart>();

            foreach (ConfigNode cn in ShipNode.GetNodes("PART"))
            {
                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");
                }

                PseudoPart returnPart = new PseudoPart(name, pID);
                retList.Add(returnPart);
            }
            return(retList);
        }
Exemplo n.º 3
0
        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;
        }