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

Public Member Functions

void OnInitPersistentEngine ()
 
void SetNull ()
 
void SelectItemByID (int _id, SelectItemMode _mode=SelectItemMode.Use, bool ignoreInventory=false)
 Selects an inventory item (InvItem) by referencing its ID number. More...
 
void ReselectLastItem ()
 Re-selects the last-selected inventory item, if available. More...
 
void SelectItem (InvInstance invInstance, SelectItemMode _mode=SelectItemMode.Use)
 Selects an inventory item (InvItem) More...
 
void Replace (int _addID, int _removeID, int addAmount=1)
 Replaces one inventory item carried by the player with another, retaining its position in its MenuInventoryBox element. More...
 
void Add (int itemID, int amount=1, bool selectAfter=false, int playerID=-1, bool addToFront=false)
 Adds an inventory item to the player's inventory. More...
 
void Add (InvInstance newInstance, bool selectAfter=false, int playerID=-1, bool addToFront=false)
 Adds an inventory item to the player's inventory. More...
 
void Remove (int _id)
 Removes an inventory item from the player's inventory. If multiple instances of the item can be held, all instances will be removed. More...
 
void Remove (InvInstance invInstance)
 
void Remove (int _id, int amount)
 Removes some instances of an inventory items from the player's inventory. More...
 
void AddToOtherPlayer (InvInstance invInstance, int playerID, bool addToFront)
 
void RemoveFromOtherPlayer (int itemID, int playerID)
 Removes an inventory item from a player's inventory. If multiple instances of the item can be held, all instances will be removed. More...
 
void RemoveFromOtherPlayer (int itemID, int amount, int playerID)
 Removes some instances of an inventory item from a player's inventory. More...
 
void RemoveAllFromOtherPlayer (int playerID)
 
void Remove (string _name, int amount=0)
 Removes an inventory item from the player's inventory. More...
 
void RemoveAll ()
 Removes all items from the player's inventory More...
 
int GetCount (int _invID)
 Gets the amount of a particular inventory item within the player's inventory. More...
 
int GetCount (int _invID, int _playerID)
 Gets the amount of a particular inventory item within any player's inventory, if multiple Player prefabs are supported. More...
 
int GetCountFromAllPlayers (int _invID)
 Gets the amount of a particular inventory item within all player inventories, if multiple Player prefabs are supported. More...
 
int GetNumberOfItemsCarried (bool includeMultipleInSameSlot=false)
 Gets the total number of inventory items currently held by the active Player. More...
 
int GetNumberOfItemsCarried (int _playerID, bool includeMultipleInSameSlot=false)
 Gets the total number of inventory items currently held by a given Player, if multiple Players are supported. More...
 
int GetNumberOfItemsCarriedByAllPlayers (bool includeMultipleInSameSlot=false)
 Gets the total number of inventory items currently held by all Players, if multiple Players are supported. More...
 
int GetNumberOfItemsCarriedInCategory (int categoryID, bool includeMultipleInSameSlot=false)
 Gets the total number of inventory items currently held by the active Player. More...
 
int GetNumberOfItemsCarriedInCategory (int categoryID, int _playerID, bool includeMultipleInSameSlot=false)
 Gets the total number of inventory items currently held by a given Player, if multiple Players are supported. More...
 
int GetNumberOfItemsCarriedInCategoryByAllPlayers (int categoryID, bool includeMultipleInSameSlot=false)
 Gets the total number of inventory items currently held by all Players, if multiple Players are supported. More...
 
InvInstance GetInstance (int _id)
 Gets an inventory item instance within the player's current inventory. More...
 
InvItem GetItem (int _id)
 Gets an inventory item within the player's current inventory. More...
 
InvItem GetItem (string _name)
 Gets the first-found inventory item within the player's current inventory. More...
 
InvInstance GetInstance (string _name)
 Gets the first-found instance of an inventory item within the player's current inventory. More...
 
InvInstance[] GetInstances (int _id)
 Gets all instances of an inventory item within the player's current inventory. More...
 
InvInstance[] GetInstances (string _name)
 Gets all instances of an inventory item within the player's current inventory. More...
 
bool IsCarryingItem (int itemID)
 Checks if an inventory item is within the player's current inventory. More...
 
bool IsCarryingItem (InvItem invItem)
 Checks if an inventory item is within the player's current inventory. More...
 
bool IsCarryingItem (InvInstance invInstance)
 
void ShowInteractions (InvInstance invInstance)
 Sets up all "Interaction" menus according to a specific inventory item. More...
 
void SetHoverItem (InvInstance invInstance, MenuInventoryBox menuInventoryBox)
 Sets the item currently being hovered over by the mouse cursor. More...
 
void SetHoverItem (InvInstance invInstance, MenuCrafting menuCrafting)
 Sets the item currently being hovered over by the mouse cursor. More...
 
void ClearHoverItem ()
 
void RemoveRecipes ()
 
void RemoveRecipe (string menuName, string craftingIngredientsName)
 Resets the inventory associated with a specific Crafting Ingredients element More...
 
Recipe CalculateRecipe (InvCollection ingredientsInvCollection)
 Works out which Recipe, if any, for which all ingredients have been correctly arranged. More...
 
void PerformCrafting (InvCollection ingredientsInvCollection, Recipe recipe, bool selectAfter)
 Crafts a new inventory item, and removes the relevent ingredients, according to a Recipe. More...
 
InvInstance PerformCrafting (InvCollection ingredientsInvCollection, Recipe recipe, InvCollection toInvCollection=null)
 Crafts a new inventory item, and removes the relevent ingredients, according to a Recipe. More...
 
List< InvInstanceRemoveEmptySlots (List< InvInstance > invInstances)
 
InvCollection GetIngredientsInvCollection (string menuName, string craftingElementName)
 Gets an InvCollection of ingredients associated with a given MenuCrafting element More...
 
void AssignPlayerInventory (InvCollection invCollection)
 Assign's the player's current inventory in bulk More...
 
void DrawHighlighted (Rect _rect)
 Draws the currently-highlight item across a set region of the screen. More...
 
void HighlightItemOnInstant (int _id)
 Fully highlights an inventory item instantly. More...
 
void HighlightItemOffInstant ()
 
void HighlightItem (int _id, HighlightType _type)
 Highlights an inventory item. More...
 
void HighlightItem (InvInstance invInstance, HighlightType _type)
 Highlights an inventory item instance. More...
 
virtual void DrawSelectedInventoryCount ()
 
bool ProcessInventoryBoxClick (AC.Menu _menu, MenuInventoryBox inventoryBox, int _slot, MouseState _mouseState)
 Processes the clicking of an inventory item within a MenuInventoryBox element More...
 
MainData SaveMainData (MainData mainData)
 Updates a MainData class with its own variables that need saving. More...
 
void LoadMainData (MainData mainData)
 
virtual bool CanTransferContainerItemsToInventory (Container container, InvInstance invInstance)
 Checks if an item can be transferred from a Container to the current Player's inventory More...
 
void OnInitialiseScene ()
 

Protected Member Functions

void OnApplicationQuit ()
 
void OnEnable ()
 
void OnDisable ()
 
virtual string GetInventoryCountText ()
 
void OnInventoryInteract (InvItem invItem, int cursorID)
 
void OnInventoryCombine (InvItem invItemA, InvItem invItemB)
 
void OnUpdatePlayableScreenArea ()
 
void AssignStartingItems ()
 
InvCollection GetItemsOnStart (int playerID=-1)
 
void RemoveFromOtherPlayer (int invID, int amount, bool setAmount, int playerID)
 
List< InvInstanceReorderItems (List< InvInstance > invInstances)
 

Protected Attributes

InvCollection playerInvCollection = new InvCollection ()
 
List< IngredientCollectioningredientCollections = new List<IngredientCollection> ()
 
InvInstance selectedInstance = null
 
InvInstance lastSelectedInstance = null
 
InvInstance hoverInstance = null
 
InvInstance highlightInstance = null
 
bool showHoverLabel = true
 
InvInstance lastClickedInstance
 
GUIStyle countStyle = new GUIStyle ()
 
TextEffects countTextEffects
 
HighlightState highlightState = HighlightState.None
 
float pulse = 0f
 
int pulseDirection = 0
 

Properties

InvInstance SelectedInstance [get]
 
InvItem SelectedItem [get]
 
InvInstance HighlightInstance [get]
 
List< InvItemlocalItems [get]
 
InvCollection[] CraftingInvCollections [get]
 
InvCollection PlayerInvCollection [get]
 
InvItem hoverItem [get]
 
InvInstance HoverInstance [get]
 
InvInstance LastSelectedInstance [get]
 
InvInstance LastClickedInstance [get, set]
 
InvItem LastClickedItem [get]
 
InvItem LastSelectedItem [get]
 
bool ShowHoverLabel [get]
 

Detailed Description

This component is where inventory items (see InvItem) are stored at runtime. When the player aquires an item, it is transferred here (into _localItems) from the InventoryManager asset. It should be placed on the PersistentEngine prefab.

Member Function Documentation

◆ Add() [1/2]

void AC.RuntimeInventory.Add ( int  itemID,
int  amount = 1,
bool  selectAfter = false,
int  playerID = -1,
bool  addToFront = false 
)

Adds an inventory item to the player's inventory.

Parameters
itemIDThe ID of the inventory item to add
amountThe number of instances of the item to add
selectAfterIf True, then the inventory item will be automatically selected
playerIDThe ID number of the Player to receive the item, if multiple Player prefabs are supported. If playerID = -1, the current player will receive the item
addToFrontIf True, the new item will be added to the front of the inventory

◆ Add() [2/2]

void AC.RuntimeInventory.Add ( InvInstance  newInstance,
bool  selectAfter = false,
int  playerID = -1,
bool  addToFront = false 
)

Adds an inventory item to the player's inventory.

Parameters
newInstanceThe instance of the inventory item to add
selectAfterIf True, then the inventory item will be automatically selected
playerIDThe ID number of the Player to receive the item, if multiple Player prefabs are supported. If playerID = -1, the current player will receive the item
addToFrontIf True, the new item will be added to the front of the inventory

◆ AssignPlayerInventory()

void AC.RuntimeInventory.AssignPlayerInventory ( InvCollection  invCollection)

Assign's the player's current inventory in bulk

Parameters
newInventoryA list of the InvInstance classes that make up the new inventory

◆ CalculateRecipe()

Recipe AC.RuntimeInventory.CalculateRecipe ( InvCollection  ingredientsInvCollection)

Works out which Recipe, if any, for which all ingredients have been correctly arranged.

Parameters
ingredientsInvCollectionThe InvCollection to get ingredients from
Returns
The Recipe, if any, for which all ingredients have been correctly arranged

◆ CanTransferContainerItemsToInventory()

virtual bool AC.RuntimeInventory.CanTransferContainerItemsToInventory ( Container  container,
InvInstance  invInstance 
)
virtual

Checks if an item can be transferred from a Container to the current Player's inventory

Parameters
containerThe Container to transfer from
invInstanceThe inventory item to to transfer
Returns
True if the item can be tranferred. This is always True, provided containerItem is not null, but the method can be overridden through subclassing

◆ ClearHoverItem()

void AC.RuntimeInventory.ClearHoverItem ( )

Clears the item being hovered

◆ DrawHighlighted()

void AC.RuntimeInventory.DrawHighlighted ( Rect  _rect)

Draws the currently-highlight item across a set region of the screen.

Parameters
_rectThe Screen-Space co-ordinates at which to draw the highlight item

◆ DrawSelectedInventoryCount()

virtual void AC.RuntimeInventory.DrawSelectedInventoryCount ( )
virtual

Draws how much of the selected item are selected, if greater than one. This should be called within an OnGUI function.

◆ GetCount() [1/2]

int AC.RuntimeInventory.GetCount ( int  _invID)

Gets the amount of a particular inventory item within the player's inventory.

Parameters
_invIDThe ID number of the inventory item (InvItem) in question
Returns
The amount of the inventory item within the player's inventory.

◆ GetCount() [2/2]

int AC.RuntimeInventory.GetCount ( int  _invID,
int  _playerID 
)

Gets the amount of a particular inventory item within any player's inventory, if multiple Player prefabs are supported.

Parameters
_invIDThe ID number of the inventory item (InvItem) in question
playerIDThe ID number of the Player to refer to
Returns
The amount of the inventory item within the player's inventory.

◆ GetCountFromAllPlayers()

int AC.RuntimeInventory.GetCountFromAllPlayers ( int  _invID)

Gets the amount of a particular inventory item within all player inventories, if multiple Player prefabs are supported.

Parameters
_invIDThe ID number of the inventory item (InvItem) in question
playerIDThe ID number of the Player to refer to
Returns
The amount of the inventory item within all player inventories.

◆ GetIngredientsInvCollection()

InvCollection AC.RuntimeInventory.GetIngredientsInvCollection ( string  menuName,
string  craftingElementName 
)

Gets an InvCollection of ingredients associated with a given MenuCrafting element

Parameters
menuNameThe title of the Menu that contains the MenuCrafting element
craftingElementNameThe title of the "Ingredients" MenuCrafting element
Returns
The InvCollection of ingredients associated with the MenuCrafting element

◆ GetInstance() [1/2]

InvInstance AC.RuntimeInventory.GetInstance ( int  _id)

Gets an inventory item instance within the player's current inventory.

Parameters
_idThe ID number of the inventory item
Returns
The inventory item, if it is held by the player

◆ GetInstance() [2/2]

InvInstance AC.RuntimeInventory.GetInstance ( string  _name)

Gets the first-found instance of an inventory item within the player's current inventory.

Parameters
_nameThe name of the InvItem to find
Returns
The inventory item, if it is held by the player

◆ GetInstances() [1/2]

InvInstance [] AC.RuntimeInventory.GetInstances ( int  _id)

Gets all instances of an inventory item within the player's current inventory.

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

◆ GetInstances() [2/2]

InvInstance [] AC.RuntimeInventory.GetInstances ( string  _name)

Gets all instances of an inventory item within the player's current inventory.

Parameters
_nameThe name of the InvItem to find
Returns
All instances of the inventory item

◆ GetItem() [1/2]

InvItem AC.RuntimeInventory.GetItem ( int  _id)

Gets an inventory item within the player's current inventory.

Parameters
_idThe ID number of the inventory item
Returns
The inventory item, if it is held by the player

◆ GetItem() [2/2]

InvItem AC.RuntimeInventory.GetItem ( string  _name)

Gets the first-found inventory item within the player's current inventory.

Parameters
_nameThe name of the InvItem to find
Returns
The inventory item, if it is held by the player

◆ GetNumberOfItemsCarried() [1/2]

int AC.RuntimeInventory.GetNumberOfItemsCarried ( bool  includeMultipleInSameSlot = false)

Gets the total number of inventory items currently held by the active Player.

Parameters
includeMultipleInSameSlotIf True, then multiple items in the same slot will be counted separately
Returns
The total number of inventory items currently held by the active Player

◆ GetNumberOfItemsCarried() [2/2]

int AC.RuntimeInventory.GetNumberOfItemsCarried ( int  _playerID,
bool  includeMultipleInSameSlot = false 
)

Gets the total number of inventory items currently held by a given Player, if multiple Players are supported.

Parameters
playerIDThe ID number of the Player to refer to
includeMultipleInSameSlotIf True, then multiple items in the same slot will be counted separately
Returns
The total number of inventory items currently held by the given Player

◆ GetNumberOfItemsCarriedByAllPlayers()

int AC.RuntimeInventory.GetNumberOfItemsCarriedByAllPlayers ( bool  includeMultipleInSameSlot = false)

Gets the total number of inventory items currently held by all Players, if multiple Players are supported.

Parameters
includeMultipleInSameSlotIf True, then multiple items in the same slot will be counted separately
Returns
The total number of inventory items currently held by all Players

◆ GetNumberOfItemsCarriedInCategory() [1/2]

int AC.RuntimeInventory.GetNumberOfItemsCarriedInCategory ( int  categoryID,
bool  includeMultipleInSameSlot = false 
)

Gets the total number of inventory items currently held by the active Player.

Parameters
categoryIDIf >=0, then only items placed in the category with that ID will be counted
Returns
The total number of inventory items currently held by the active Player

◆ GetNumberOfItemsCarriedInCategory() [2/2]

int AC.RuntimeInventory.GetNumberOfItemsCarriedInCategory ( int  categoryID,
int  _playerID,
bool  includeMultipleInSameSlot = false 
)

Gets the total number of inventory items currently held by a given Player, if multiple Players are supported.

Parameters
categoryIDIf >=0, then only items placed in the category with that ID will be counted
playerIDThe ID number of the Player to refer to
Returns
The total number of inventory items currently held by the given Player

◆ GetNumberOfItemsCarriedInCategoryByAllPlayers()

int AC.RuntimeInventory.GetNumberOfItemsCarriedInCategoryByAllPlayers ( int  categoryID,
bool  includeMultipleInSameSlot = false 
)

Gets the total number of inventory items currently held by all Players, if multiple Players are supported.

Parameters
categoryIDIf >=0, then only items placed in the category with that ID will be counted
Returns
The total number of inventory items currently held by the all Players

◆ HighlightItem() [1/2]

void AC.RuntimeInventory.HighlightItem ( int  _id,
HighlightType  _type 
)

Highlights an inventory item.

Parameters
_idThe ID number of the inventory item to highlight
_typeThe type of highlighting effect to perform (Enable, Disable, PulseOnce, PulseContinuously)

◆ HighlightItem() [2/2]

void AC.RuntimeInventory.HighlightItem ( InvInstance  invInstance,
HighlightType  _type 
)

Highlights an inventory item instance.

Parameters
invInstanceThe inventory item instance to highlight
_typeThe type of highlighting effect to perform (Enable, Disable, PulseOnce, PulseContinuously)

◆ HighlightItemOffInstant()

void AC.RuntimeInventory.HighlightItemOffInstant ( )

Removes all highlighting from the inventory item curently being highlighted.

◆ HighlightItemOnInstant()

void AC.RuntimeInventory.HighlightItemOnInstant ( int  _id)

Fully highlights an inventory item instantly.

Parameters
_idThe ID number of the inventory item (see InvItem) to highlight

◆ IsCarryingItem() [1/2]

bool AC.RuntimeInventory.IsCarryingItem ( int  itemID)

Checks if an inventory item is within the player's current inventory.

Parameters
itemIDThe ID number of the inventory item
Returns
True if the inventory item is within the player's current inventory

◆ IsCarryingItem() [2/2]

bool AC.RuntimeInventory.IsCarryingItem ( InvItem  invItem)

Checks if an inventory item is within the player's current inventory.

Parameters
invItemThe inventory item
Returns
True if the inventory item is within the player's current inventory

◆ OnInitPersistentEngine()

void AC.RuntimeInventory.OnInitPersistentEngine ( )

Transfers any relevant data from InventoryManager when the game begins or restarts.

◆ PerformCrafting() [1/2]

void AC.RuntimeInventory.PerformCrafting ( InvCollection  ingredientsInvCollection,
Recipe  recipe,
bool  selectAfter 
)

Crafts a new inventory item, and removes the relevent ingredients, according to a Recipe.

Parameters
ingredientsInvCollectionThe InvCollection to get ingredients from
recipeThe Recipe to perform
selectAfterIf True, then the resulting inventory item will be selected once the crafting is complete

◆ PerformCrafting() [2/2]

InvInstance AC.RuntimeInventory.PerformCrafting ( InvCollection  ingredientsInvCollection,
Recipe  recipe,
InvCollection  toInvCollection = null 
)

Crafts a new inventory item, and removes the relevent ingredients, according to a Recipe.

Parameters
ingredientsInvCollectionThe InvCollection to get ingredients from
recipeThe Recipe to perform
toInvCollectionIf assigned, the InvCollection to place the newly-created Recipe item into

◆ ProcessInventoryBoxClick()

bool AC.RuntimeInventory.ProcessInventoryBoxClick ( AC.Menu  _menu,
MenuInventoryBox  inventoryBox,
int  _slot,
MouseState  _mouseState 
)

Processes the clicking of an inventory item within a MenuInventoryBox element

Parameters
_menuThe Menu that contains the MenuInventoryBox element
inventoryBoxThe MenuInventoryBox element that was clicked on
_slotThe index number of the MenuInventoryBox slot that was clicked on
_mouseStateThe state of the mouse when the click occured (Normal, SingleClick, RightClick, DoubleClick, HeldDown, LetGo)
Returns
True if the click had an effect and should be consumed

◆ Remove() [1/3]

void AC.RuntimeInventory.Remove ( int  _id)

Removes an inventory item from the player's inventory. If multiple instances of the item can be held, all instances will be removed.

Parameters
_idThe ID number of the inventory item (InvItem) to remove

◆ Remove() [2/3]

void AC.RuntimeInventory.Remove ( int  _id,
int  amount 
)

Removes some instances of an inventory items from the player's inventory.

Parameters
_idThe ID number of the inventory item (InvItem) to remove
amountThe amount if the inventory item to remove, if the InvItem's canCarryMultiple = True

◆ Remove() [3/3]

void AC.RuntimeInventory.Remove ( string  _name,
int  amount = 0 
)

Removes an inventory item from the player's inventory.

Parameters
_nameThe name of the item to remove
amountIf >0, then only that quantity will be removed, if the item's canCarryMultiple property is True. Otherwise, all instances will be removed

◆ RemoveAll()

void AC.RuntimeInventory.RemoveAll ( )

Removes all items from the player's inventory

◆ RemoveFromOtherPlayer() [1/2]

void AC.RuntimeInventory.RemoveFromOtherPlayer ( int  itemID,
int  amount,
int  playerID 
)

Removes some instances of an inventory item from a player's inventory.

Parameters
_idThe ID number of the inventory item (InvItem) to remove
amountThe amount if the inventory item to remove, if the InvItem's canCarryMultiple = True.
playerIDThe ID number of the player to affect, if player-switching is enabled

◆ RemoveFromOtherPlayer() [2/2]

void AC.RuntimeInventory.RemoveFromOtherPlayer ( int  itemID,
int  playerID 
)

Removes an inventory item from a player's inventory. If multiple instances of the item can be held, all instances will be removed.

Parameters
itemIDThe ID number of the inventory item (InvItem) to remove
playerIDThe ID number of the player to affect, if player-switching is enabled

◆ RemoveRecipe()

void AC.RuntimeInventory.RemoveRecipe ( string  menuName,
string  craftingIngredientsName 
)

Resets the inventory associated with a specific Crafting Ingredients element

Parameters
menuNameThe name of the Menu
craftingIngredientsNameThe name of the Crafting menu element of type Ingredients

◆ RemoveRecipes()

void AC.RuntimeInventory.RemoveRecipes ( )

Resets all active recipes, and clears all MenuCrafting elements

◆ Replace()

void AC.RuntimeInventory.Replace ( int  _addID,
int  _removeID,
int  addAmount = 1 
)

Replaces one inventory item carried by the player with another, retaining its position in its MenuInventoryBox element.

Parameters
_addIDThe ID number of the inventory item (InvItem) to add
_removeIDThe ID number of the inventory item (InvItem) to remove
addAmountThe amount if the new inventory item to add, if the InvItem's canCarryMultiple = True

◆ ReselectLastItem()

void AC.RuntimeInventory.ReselectLastItem ( )

Re-selects the last-selected inventory item, if available.

◆ SaveMainData()

MainData AC.RuntimeInventory.SaveMainData ( MainData  mainData)

Updates a MainData class with its own variables that need saving.

Parameters
mainDataThe original MainData class
Returns
The updated MainData class

◆ SelectItem()

void AC.RuntimeInventory.SelectItem ( InvInstance  invInstance,
SelectItemMode  _mode = SelectItemMode.Use 
)

Selects an inventory item (InvItem)

Parameters
invInstanceThe instance of the inventory item to select
_modeWhat mode the item is selected in (Use, Give)

◆ SelectItemByID()

void AC.RuntimeInventory.SelectItemByID ( int  _id,
SelectItemMode  _mode = SelectItemMode.Use,
bool  ignoreInventory = false 
)

Selects an inventory item (InvItem) by referencing its ID number.

Parameters
_idThe inventory item's ID number
_modeWhat mode the item is selected in (Use, Give)

◆ SetHoverItem() [1/2]

void AC.RuntimeInventory.SetHoverItem ( InvInstance  invInstance,
MenuCrafting  menuCrafting 
)

Sets the item currently being hovered over by the mouse cursor.

Parameters
invInstanceThe instance of the item to set
menuCraftingThe MenuInventoryBox that the item is displayed within

◆ SetHoverItem() [2/2]

void AC.RuntimeInventory.SetHoverItem ( InvInstance  invInstance,
MenuInventoryBox  menuInventoryBox 
)

Sets the item currently being hovered over by the mouse cursor.

Parameters
invInstanceThe instance of the item to set
menuInventoryBoxThe MenuInventoryBox that the item is displayed within

◆ SetNull()

void AC.RuntimeInventory.SetNull ( )

De-selects the active inventory item.

◆ ShowInteractions()

void AC.RuntimeInventory.ShowInteractions ( InvInstance  invInstance)

Sets up all "Interaction" menus according to a specific inventory item.

Parameters
invInstanceThe relevant inventory item instance

Property Documentation

◆ CraftingInvCollections

InvCollection [] AC.RuntimeInventory.CraftingInvCollections
get

The InvCollections that holds the current set of items to be crafted

◆ HighlightInstance

InvInstance AC.RuntimeInventory.HighlightInstance
get

The inventory item that is currently being highlighted within an MenuInventoryBox element

◆ HoverInstance

InvInstance AC.RuntimeInventory.HoverInstance
get

The instance of the inventory item that is currently being hovered over

◆ hoverItem

InvItem AC.RuntimeInventory.hoverItem
get

The inventory item that is currently being hovered over

◆ LastClickedInstance

InvInstance AC.RuntimeInventory.LastClickedInstance
getset

The instance of the last inventory item that the player clicked on, in any MenuInventoryBox element type

◆ LastClickedItem

InvItem AC.RuntimeInventory.LastClickedItem
get

The last inventory item that the player clicked on, in any MenuInventoryBox element type

◆ LastSelectedInstance

InvInstance AC.RuntimeInventory.LastSelectedInstance
get

The instance of the last inventory item to be selected. This will return the currently-selected item if one exists

◆ LastSelectedItem

InvItem AC.RuntimeInventory.LastSelectedItem
get

The last inventory item to be selected. This will return the currently-selected item if one exists

◆ localItems

List<InvItem> AC.RuntimeInventory.localItems
get

A List of inventory items carried by the player. This is calculated from LocalInstances and should not be called every frame

◆ PlayerInvCollection

InvCollection AC.RuntimeInventory.PlayerInvCollection
get

The InvCollection that holds the current set of items in the Player::s inventory

◆ SelectedInstance

InvInstance AC.RuntimeInventory.SelectedInstance
get

The instance inventory item that is currently selected

◆ SelectedItem

InvItem AC.RuntimeInventory.SelectedItem
get

The inventory item that is currently selected

◆ ShowHoverLabel

bool AC.RuntimeInventory.ShowHoverLabel
get

If True, then the Hotspot label will show the name of the inventory item that the mouse is hovering over