Пример #1
0
        /// <summary>
        /// Method to add data to favorite list.
        /// NOTE: This could possibly be moved to the main plugin class
        /// </summary>
        /// <param fromSelected>Flag for adding from CustomFileList or from current character</param>
        private static void AddSelected(bool fromSelected = false)
        {
            bool change = false;

            if (!KK_Archetypes._loadCosToggle.isOn) // Do not add character data if in Coordinate Load menu
            {
                ChaFileControl file = fromSelected ? Utilities.GetSelectedCharacter() : MakerAPI.GetCharacterControl().chaFile;
                if (file != null)
                {
                    Hair.AddHairStyle(file);
                    Hair.AddHairColor(file);
                    Face.AddEyeColor(file);
                    Face.AddEyeline(file);
                    Face.AddEyebrow(file);
                    Face.AddFace(file, fromSelected);
                    Body.AddSkin(file);
                    Body.AddBody(file, fromSelected);
                }
            }
            ChaFileCoordinate clothes;
            string            key; // Create key in case user is adding coordinate from character instead of coordinate file

            if (fromSelected)
            {
                if (KK_Archetypes._loadCosToggle.isOn)
                {
                    clothes = Utilities.GetSelectedCoordinate();
                    key     = null;
                }
                else
                {
                    clothes = Utilities.GetSelectedCharacter().coordinate[Clothes._coordinateToggle];
                    key     = Utilities.CreateNewKey(Utilities.GetSelectedCharacter());
                }
            }
            else
            {
                clothes = MakerAPI.GetCharacterControl().nowCoordinate;
                key     = Utilities.CreateNewKey(Utilities.GetSelectedCharacter());
            }
            if (clothes != null)
            {
                Clothes.AddClothes(clothes, key);
                if (KK_Archetypes.IncrementFlag)
                {
                    Utilities.IncrementSelectIndex();
                }
                Utilities.PlaySound();
            }
        }
Пример #2
0
        /// <summary>
        /// Method to load a specific key from KKATData.
        /// </summary>
        /// <param category>Category of key to be retrieved</param>
        internal void LoadEntry(Category category, string key)
        {
            switch (category)
            {
            case Category.Hairstyle:
                Hair.LoadHairStyle(key);
                Utilities.FinalizeLoad();
                break;

            case Category.Haircolor:
                Hair.LoadHairColor(key);
                Utilities.FinalizeLoad();
                break;

            case Category.Eyecolor:
                Face.LoadEyeColor(key);
                Utilities.FinalizeLoad();
                break;

            case Category.Eyeline:
                Face.LoadEyeline(key);
                Utilities.FinalizeLoad();
                break;

            case Category.Eyebrow:
                Face.LoadEyebrow(key);
                Utilities.FinalizeLoad();
                break;

            case Category.Face:
                Face.LoadFace(key);
                Utilities.FinalizeLoad();
                break;

            case Category.Skin:
                Body.LoadSkin(key);
                Utilities.FinalizeLoad();
                break;

            case Category.Body:
                Body.LoadBody(key);
                Utilities.FinalizeLoad();
                break;

            case Category.Clothes:
                Clothes.LoadClothes(key);
                Utilities.FinalizeLoad();
                break;
            }
        }
Пример #3
0
 /// <summary>
 /// Method to load (random) data from favorite list.
 /// NOTE: This could possibly be moved to the main plugin class
 /// </summary>
 /// <param combine>Flag for checking if data is loaded in combination</param>
 private static void LoadSelected(bool combine = false)
 {
     Hair.LoadHairStyle();
     Hair.LoadHairColor();
     Face.LoadEyeColor();
     Face.LoadEyeline();
     Face.LoadEyebrow();
     Face.LoadFace();
     Body.LoadSkin();
     Body.LoadBody();
     Clothes.LoadClothes();
     if (!combine)
     {
         Utilities.FinalizeLoad();
     }
 }