45 virtual bool add (
const objDef_t* od,
int amount,
int looseAmount);
46 virtual bool add (
const char* objDefId,
int amount,
int looseAmount);
56 int count (
void)
const;
57 int size (
void)
const;
virtual bool add(const objDef_t *od, int amount, int looseAmount)
Add items to the cargo.
int getLooseAmount(const objDef_t *od) const
Returns amount of loose item in the cargo.
void empty(void)
Empties the cargo.
bool load(xmlNode_t *root)
Load item cargo from xml savegame.
Defines all attributes of objects used in the inventory.
struct itemCargo_s itemCargo_t
item cargo entry
int size(void) const
Calculate size of all items in the cargo.
bool isEmpty(void) const
Checks if the cargo is empty.
ItemCargo(void)
Creates and initializes ItemCargo object.
virtual ~ItemCargo(void)
Destroys ItemCargo with it's internal data.
int count(void) const
Count all items in the cargo.
bool save(xmlNode_t *root) const
Save item cargo to xml savegame.
linkedList_t * list(void) const
Returns a copy of the cargo list.
int getAmount(const objDef_t *od) const
Returns amount of an item in the cargo.