Skip to main content

RecipePlugin.CheckCraft

Declaration#

public virtual void CheckCraft(GDTKRecipe recipe, Boolean& cancel)

Parameters#

NameDescription
recipeRecipe to check
cancelChange value to true to cancel crafting

Description#

Check if a recipe is allowed to be crafted

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(GDTKRecipe target)    {        bool cancel = false;        foreach (RecipePlugin plugin in target.plugins)        {            plugin.CheckCraft(target, ref cancel);            if (cancel) return;        }    }
}