Adventure Creator  1.66.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.Recipe Class Reference

Public Member Functions

 Recipe (int[] idArray)
 The default Constructor. More...

Public Attributes

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

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 Data Documentation

◆ actionListOnCreate

ActionListAsset AC.Recipe.actionListOnCreate

The ActionListAsset to run when the recipe is created

◆ autoCreate

bool AC.Recipe.autoCreate = true

If True, then the output ingredient will appear automatically when the correct ingredients are used. If False, then the player will have to run the "Inventory: Crafting" Action as an additional step.

◆ 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