Ejemplo n.º 1
0
        private int addText(string text)
        {
            int count = 0;

            foreach (string s in GGCRUtil.Languages())
            {
                GGCRTblFile txtFile = new GGCRTblFile(GGCRStaticConfig.PATH + @"\language\" + s + @"\AbilitySpecList.tbl");
                if (txtFile.Count > count)
                {
                    count = txtFile.Count;
                }
            }
            count++;
            foreach (string s in GGCRUtil.Languages())
            {
                GGCRTblFile   txtFile = new GGCRTblFile(GGCRStaticConfig.PATH + @"\language\" + s + @"\AbilitySpecList.tbl");
                List <string> list    = txtFile.ListAllText();
                int           span    = count - list.Count;
                for (int i = 0; i < span; i++)
                {
                    list.Add(text);
                }
                txtFile.Save(list);
            }
            return(count);
        }
Ejemplo n.º 2
0
        public override void SaveUnitName(string name)
        {
            int           idx     = this.ID;
            GGCRTblFile   txtFile = new GGCRTblFile(GGCRStaticConfig.MachineTxtFile);
            List <string> list    = txtFile.ListAllText();

            if (list.Count > idx)
            {
                list[idx] = name;
                txtFile.Save(list);
                PkdFile.AllText[idx] = name;
            }
        }
Ejemplo n.º 3
0
        public override void SaveUnitName(string name)
        {
            int           idx     = BitConverter.ToInt16(this.Data, NAME_IDX);
            GGCRTblFile   txtFile = new GGCRTblFile(GGCRStaticConfig.MachineTxtFile);
            List <string> list    = txtFile.ListAllText();

            if (list.Count > idx)
            {
                list[idx] = name;
                txtFile.Save(list);
                PkdFile.AllText[idx] = name;
            }
        }