PowerQuest
IInventory Interface Reference

Detailed Description

Inventory: Contains functions and data for manipluating Inventory Items.

Properties

string Description [get, set]
 Gets/Sets the name shown to players. More...
 
string AnimGui [get, set]
 
string AnimCursor [get, set]
 
string AnimCursorInactive [get, set]
 
string ScriptName [get]
 The name used in scripts. More...
 
bool Active [get, set]
 Whether this item is the active item for the current player (ie: selected item to use on stuff) More...
 
bool Owned [get, set]
 Whether the current player has the item in their inventory. More...
 
bool EverCollected [get]
 Whether the item has ever been collected. More...
 
Inventory Data [get]
 Access to the base class with extra functionality used by the PowerQuest. More...
 

Public Member Functions

void Add (int quantity=1)
 Gives the inventory item to the current player. Same as C.Player.AddInventory(item) More...
 
void AddAsActive (int quantity=1)
 Gives the inventory item to the current player and set's it as active inventory. Same as C.Player.AddInventory(item) More...
 
void Remove (int quantity=1)
 Removes the item from the current player. Same as C.Player.RemoveInventory(item) More...
 
void SetActive ()
 Sets this item as the active item for the current player (ie: selected item to use on stuff) More...
 
GetScript< T > ()
 Access to the specific quest script for the object. Use the specific item class as the templated parameter so you can access specific members of the script. Eg: GetScript<InventoryKey>().m_inDoor = true;. More...
 

Property Documentation

◆ Description

string Description
getset

Gets/Sets the name shown to players.

◆ ScriptName

string ScriptName
get

The name used in scripts.

◆ Active

bool Active
getset

Whether this item is the active item for the current player (ie: selected item to use on stuff)

◆ Owned

bool Owned
getset

Whether the current player has the item in their inventory.

◆ EverCollected

bool EverCollected
get

Whether the item has ever been collected.

◆ Data

Inventory Data
get

Access to the base class with extra functionality used by the PowerQuest.

Member Function Documentation

◆ Add()

void Add ( int  quantity = 1)

Gives the inventory item to the current player. Same as C.Player.AddInventory(item)

◆ AddAsActive()

void AddAsActive ( int  quantity = 1)

Gives the inventory item to the current player and set's it as active inventory. Same as C.Player.AddInventory(item)

◆ Remove()

void Remove ( int  quantity = 1)

Removes the item from the current player. Same as C.Player.RemoveInventory(item)

◆ SetActive()

void SetActive ( )

Sets this item as the active item for the current player (ie: selected item to use on stuff)

◆ GetScript< T >()

T GetScript< T > ( )

Access to the specific quest script for the object. Use the specific item class as the templated parameter so you can access specific members of the script. Eg: GetScript<InventoryKey>().m_inDoor = true;.

Type Constraints
T :InventoryScript<T>