Exemple #1
0
        public static void UpdateLabel_Perk()
        {
            perkLabel    = new string[perkDB.perkList.Count + 1];
            perkLabel[0] = "Unassigned";
            for (int i = 0; i < perkDB.perkList.Count; i++)
            {
                string name = perkDB.perkList[i].name;
                if (name == "")
                {
                    name = "unnamed";
                }
                while (Array.IndexOf(perkLabel, name) >= 0)
                {
                    name += "_";
                }
                perkLabel[i + 1] = name;
            }

            TDSEditorWindow.SetPerkDB(perkDB, perkIDList, perkLabel);
            TDSEditorInspector.SetPerkDB(perkDB, perkIDList, perkLabel);

            dirty = !dirty;
        }
Exemple #2
0
        public static void LoadPerk()
        {
            perkDB = PerkDB.LoadDB();

            for (int i = 0; i < perkDB.perkList.Count; i++)
            {
                if (perkDB.perkList[i] != null)
                {
                    //perkDB.perkList[i].ID=i;
                    perkIDList.Add(perkDB.perkList[i].ID);
                }
                else
                {
                    perkDB.perkList.RemoveAt(i);
                    i -= 1;
                }
            }

            UpdateLabel_Perk();

            TDSEditorWindow.SetPerkDB(perkDB, perkIDList, perkLabel);
            TDSEditorInspector.SetPerkDB(perkDB, perkIDList, perkLabel);
        }