RecipePlugin.CheckCraft
Declaration#
public virtual void CheckCraft(GDTKRecipe recipe, Boolean& cancel)Parameters#
| Name | Description |
|---|---|
| recipe | Recipe to check |
| cancel | Change 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; } }
}