xoreos
0.0.5
|
#include <inventory.h>
Public Member Functions | |
void | addItem (const Common::UString &tag, int count=1) |
void | removeItem (const Common::UString &tag, int count=1) |
void | removeAllItems () |
const std::map< Common::UString, InventoryItem > & | getItems () const |
bool | hasItem (const Common::UString &tag) const |
Private Types | |
typedef std::map< Common::UString, InventoryItem > | ItemMap |
Private Attributes | |
ItemMap | _items |
Definition at line 41 of file inventory.h.
|
private |
Definition at line 50 of file inventory.h.
void Engines::KotOR::Inventory::addItem | ( | const Common::UString & | tag, |
int | count = 1 |
||
) |
Definition at line 31 of file inventory.cpp.
References _items, Engines::KotOR::InventoryItem::count, Common::UString::empty(), and Engines::KotOR::InventoryItem::tag.
Referenced by Engines::KotOR::Module::addItemToActiveObject(), Engines::KotOR::Functions::createItemOnObject(), Engines::KotOR::Creature::equipItem(), Engines::KotOR::Placeable::loadObject(), and Engines::KotOR::HUD::showContainer().
const std::map< Common::UString, InventoryItem > & Engines::KotOR::Inventory::getItems | ( | ) | const |
Definition at line 67 of file inventory.cpp.
References _items.
Referenced by Engines::KotOR::MenuEquipment::fillEquipableItemsList(), Engines::KotOR::ContainerMenu::fillFromInventory(), and Engines::KotOR::HUD::showContainer().
bool Engines::KotOR::Inventory::hasItem | ( | const Common::UString & | tag | ) | const |
Definition at line 71 of file inventory.cpp.
References _items.
void Engines::KotOR::Inventory::removeAllItems | ( | ) |
Definition at line 63 of file inventory.cpp.
References _items.
Referenced by Engines::KotOR::HUD::showContainer().
void Engines::KotOR::Inventory::removeItem | ( | const Common::UString & | tag, |
int | count = 1 |
||
) |
Definition at line 47 of file inventory.cpp.
References _items, and Common::UString::empty().
Referenced by Engines::KotOR::Module::addItemToActiveObject(), and Engines::KotOR::Creature::equipItem().
|
private |
Definition at line 52 of file inventory.h.
Referenced by addItem(), getItems(), hasItem(), removeAllItems(), and removeItem().