Ejemplo n.º 1
0
        private bool CopyFromUTR(UMATextRecipe recipeToCopyFrom)
        {
            if (Debug.isDebugBuild)
            {
                Debug.Log("WardrobeConverts");
            }
            if (recipeToCopyFrom.recipeType != "Wardrobe" || recipeToCopyFrom.GetType() != typeof(UMATextRecipe))
            {
                return(false);
            }
            recipeType            = "Wardrobe";
            recipeString          = recipeToCopyFrom.recipeString;
            compatibleRaces       = recipeToCopyFrom.compatibleRaces;
            wardrobeSlot          = recipeToCopyFrom.wardrobeSlot;
            suppressWardrobeSlots = recipeToCopyFrom.suppressWardrobeSlots;
            Hides = recipeToCopyFrom.Hides;
            wardrobeRecipeThumbs = recipeToCopyFrom.wardrobeRecipeThumbs;
            name = recipeToCopyFrom.name;

            if (recipeToCopyFrom.OverrideDNA != null)
            {
                OverrideDNA = recipeToCopyFrom.OverrideDNA.Clone();
            }

            DisplayValue = recipeToCopyFrom.DisplayValue;
            return(true);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// If the given UMATextRecipe was of recipeType "DynamicCharacterAvatar", copies its to this UMADynamicCharacterAvatarRecipe, otherwise returns false.
        /// </summary>
        /// <param name="recipeToCopyFrom"></param>
        /// <returns></returns>
        private bool CopyFromUTR(UMATextRecipe recipeToCopyFrom)
        {
            if (recipeToCopyFrom.recipeType != "DynamicCharacterAvatar" || recipeToCopyFrom.GetType() != typeof(UMATextRecipe))
            {
                return(false);
            }
            recipeType = "DynamicCharacterAvatar";
            var recipeModel = JsonUtility.FromJson <DCSPackRecipe>(recipeToCopyFrom.recipeString);

            recipeModel.packedRecipeType = "DynamicCharacterAvatar";
            recipeString = JsonUtility.ToJson(recipeModel);
            name         = recipeToCopyFrom.name;
            return(true);
        }
Ejemplo n.º 3
0
 private bool CopyFromUTR(UMATextRecipe recipeToCopyFrom)
 {
     if (recipeToCopyFrom.recipeType != "Wardrobe" || recipeToCopyFrom.GetType() != typeof(UMATextRecipe))
     {
         return(false);
     }
     recipeType            = "Wardrobe";
     recipeString          = recipeToCopyFrom.recipeString;
     compatibleRaces       = recipeToCopyFrom.compatibleRaces;
     wardrobeSlot          = recipeToCopyFrom.wardrobeSlot;
     suppressWardrobeSlots = recipeToCopyFrom.suppressWardrobeSlots;
     Hides = recipeToCopyFrom.Hides;
     wardrobeRecipeThumbs = recipeToCopyFrom.wardrobeRecipeThumbs;
     name         = recipeToCopyFrom.name;
     DisplayValue = recipeToCopyFrom.DisplayValue;
     return(true);
 }