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

Public Member Functions

void ShowGUI ()
 
InvVar GetProperty (int ID)
 Gets an inventory property. More...
 
InvItem CreateNewItem (int newID=-1)
 Creates a new inventory item More...
 
Document GetDocument (int ID)
 Gets a Document. More...
 
string GetLabel (int _id)
 Gets an inventory item's label. More...
 
InvItem GetItem (int _id)
 Gets an inventory item. More...
 
Recipe GetRecipe (int _id)
 Gets a Recipe. More...
 
InvBin GetCategory (int categoryID)
 Gets an inventory category. More...
 
bool CanCarryMultiple (int itemID)
 Checks if multiple instances of an inventory item can exist. More...
 
InvItem [] GetItemsInCategory (int categoryID)
 Gets an array of all inventory items in a given category More...
 

Static Public Member Functions

static int DocumentSelectorList (int ID, string label="Document:")
 

Public Attributes

List< InvItemitems = new List<InvItem>()
 
List< InvBinbins = new List<InvBin>()
 
List< InvVarinvVars = new List<InvVar>()
 
ActionListAsset unhandledCombine
 
ActionListAsset unhandledHotspot
 
bool passUnhandledHotspotAsParameter
 
ActionListAsset unhandledGive
 
List< Reciperecipes = new List<Recipe>()
 
List< Documentdocuments = new List<Document>()
 

Detailed Description

Handles the "Inventory" tab of the Game Editor window. All inventory items, inventory categories and recipes are defined here.

Member Function Documentation

◆ CanCarryMultiple()

bool AC.InventoryManager.CanCarryMultiple ( int  itemID)

Checks if multiple instances of an inventory item can exist.

Parameters
itemIDThe ID number of the InvItem to find
Returns
True if multiple instances of the inventory item can exist

◆ CreateNewItem()

InvItem AC.InventoryManager.CreateNewItem ( int  newID = -1)

Creates a new inventory item

Parameters
newIDIf >= 0, the ID number of the item, if available. If it is already taken, the item will not be created
Returns
The newly-created item

◆ GetCategory()

InvBin AC.InventoryManager.GetCategory ( int  categoryID)

Gets an inventory category.

Parameters
categoryIDThe ID number of the inventory category to find
Returns
The inventory category

◆ GetDocument()

Document AC.InventoryManager.GetDocument ( int  ID)

Gets a Document.

Parameters
IDThe ID number of the Document to find
Returns
The Document

◆ GetItem()

InvItem AC.InventoryManager.GetItem ( int  _id)

Gets an inventory item.

Parameters
_idThe ID number of the InvItem to find
Returns
The inventory item

◆ GetItemsInCategory()

InvItem [] AC.InventoryManager.GetItemsInCategory ( int  categoryID)

Gets an array of all inventory items in a given category

Parameters
categoryIDThe ID number of the category in question
Returns
An array of all inventory items in the category

◆ GetLabel()

string AC.InventoryManager.GetLabel ( int  _id)

Gets an inventory item's label.

Parameters
_idThe ID number of the InvItem to find
Returns
The inventory item's label

◆ GetProperty()

InvVar AC.InventoryManager.GetProperty ( int  ID)

Gets an inventory property.

Parameters
IDThe ID number of the property to get
Returns
The inventory property.

◆ GetRecipe()

Recipe AC.InventoryManager.GetRecipe ( int  _id)

Gets a Recipe.

Parameters
_idThe ID number of the Recipe to find
Returns
The Recipe

◆ ShowGUI()

void AC.InventoryManager.ShowGUI ( )

Shows the GUI.

Member Data Documentation

◆ bins

List<InvBin> AC.InventoryManager.bins = new List<InvBin>()

The game's full list of inventory item categories

◆ invVars

List<InvVar> AC.InventoryManager.invVars = new List<InvVar>()

The game's full list of inventory item properties

◆ items

List<InvItem> AC.InventoryManager.items = new List<InvItem>()

The game's full list of inventory items

◆ passUnhandledHotspotAsParameter

bool AC.InventoryManager.passUnhandledHotspotAsParameter

If True, the Hotspot clicked on to initiate unhandledHotspot will be sent as a parameter to the ActionListAsset

◆ recipes

List<Recipe> AC.InventoryManager.recipes = new List<Recipe>()

The game's full list of available recipes

◆ unhandledCombine

ActionListAsset AC.InventoryManager.unhandledCombine

The default ActionListAsset to run if an inventory combination is unhandled

◆ unhandledGive

ActionListAsset AC.InventoryManager.unhandledGive

The default ActionListAsset to run if giving an inventory item to an NPC is unhandled

◆ unhandledHotspot

ActionListAsset AC.InventoryManager.unhandledHotspot

The default ActionListAsset to run if using an inventory item on a Hotspot is unhandled