Adventure Creator  1.76.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
AC.Recipe Class Reference
Inheritance diagram for AC.Recipe:

Public Member Functions

 Recipe (int[] idArray)
 The default Constructor. More...
bool CanBeCrafted (InvCollection invCollection)
 Checks if a collection of inventory item instances has all the items necessary to craft this recipe's item. More...
int GetNumItemReferences (int itemID)
int UpdateItemReferences (int oldItemID, int newItemID)

Public Attributes

string label
int id
List< Ingredientingredients = new List<Ingredient> ()
int resultID
bool useSpecificSlots
OnCreateRecipe onCreateRecipe = OnCreateRecipe.JustMoveToInventory
ActionListAsset invActionList
ActionListAsset actionListOnCreate


string EditorLabel [get]

Detailed Description

A data container for a recipe. A recipe requires multiple inventory items, optionally arranged in a specific pattern, and replaces them with a new inventory item.

Constructor & Destructor Documentation

◆ Recipe()

AC.Recipe.Recipe ( int[]  idArray)

The default Constructor.

idArrayAn array of already-used ID numbers, so that a unique one can be generated

Member Function Documentation

◆ CanBeCrafted()

bool AC.Recipe.CanBeCrafted ( InvCollection  invCollection)

Checks if a collection of inventory item instances has all the items necessary to craft this recipe's item.

invCollectionThe collection of inventory item instances to check
True if the collection has all the items necessary to craft the recipe's item

Member Data Documentation

◆ actionListOnCreate

ActionListAsset AC.Recipe.actionListOnCreate

The ActionListAsset to run when the recipe is created

◆ id


A unique identifier

◆ ingredients

List<Ingredient> AC.Recipe.ingredients = new List<Ingredient> ()

The required ingredients

◆ invActionList

ActionListAsset AC.Recipe.invActionList

The ActionListAsset to run, if onCreateRecipe = OnCreateRecipe.RunActionList

◆ label

string AC.Recipe.label

The recipe's editor name

◆ onCreateRecipe

OnCreateRecipe AC.Recipe.onCreateRecipe = OnCreateRecipe.JustMoveToInventory

What happens when the recipe is created (JustMoveToInventory, SelectItem, RunActionList)

◆ resultID

int AC.Recipe.resultID

The ID number of the associated inventory item (InvItem) created when the recipe is complete

◆ useSpecificSlots

bool AC.Recipe.useSpecificSlots

If True, then the ingredients must be placed in specific slots within a MenuCrafting element