RecipeAvailable() 공개 메소드

public RecipeAvailable ( ) : bool
리턴 bool
예제 #1
0
        /// <summary>
        /// Returns whether or not the conditions are met for this recipe to be available for the player to use.
        /// </summary>
        /// <param name="recipe">The recipe to check.</param>
        /// <returns>Whether or not the conditions are met for this recipe.</returns>
        public static bool RecipeAvailable(Recipe recipe)
        {
            ModRecipe modRecipe = recipe as ModRecipe;

            if (modRecipe != null && !modRecipe.RecipeAvailable())
            {
                return(false);
            }
            foreach (GlobalRecipe globalRecipe in globalRecipes)
            {
                if (!globalRecipe.RecipeAvailable(recipe))
                {
                    return(false);
                }
            }
            return(true);
        }