public CraftingStatus CanCraft( CraftingRecipe recipe, List <CraftingIngredient> possibleIngredients, List <ItemAttributesV2> possibleTools, List <ReagentContainer> reagentContainers ) { return(IsPlayerAbleToCraft(recipe) == false ? CraftingStatus.NotAbleToCraft : recipe.CanBeCrafted(possibleIngredients, possibleTools, reagentContainers)); }
/// <summary> /// Updates the recipe button border color. /// </summary> /// <param name="possibleIngredients">The ingredients that may be used for crafting.</param> /// <param name="possibleTools">The tools that may be used for crafting.</param> /// <param name="possibleReagents"> /// The reagents(a pair of values: a regent's index in the sigleton and its amount) /// </param> public void RefreshCraftable( List <CraftingIngredient> possibleIngredients, List <ItemAttributesV2> possibleTools, List <KeyValuePair <int, float> > possibleReagents ) { if ( PlayerManager.LocalPlayerScript.PlayerCrafting.KnowsRecipe(craftingRecipe) && craftingRecipe.CanBeCrafted( possibleIngredients, possibleTools, possibleReagents ) == CraftingStatus.AllGood ) { SetCraftableBorderColor(); return; } SetUncraftableBorderColor(); }