32typedef struct itemCargo_s {
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 ~ItemCargo(void)
Destroys ItemCargo with it's internal data.
int size(void) const
Calculate size of all items in the cargo.
void empty(void)
Empties the cargo.
bool load(xmlNode_t *root)
Load item cargo from xml savegame.
ItemCargo(void)
Creates and initializes ItemCargo object.
bool save(xmlNode_t *root) const
Save item cargo to xml savegame.
bool isEmpty(void) const
Checks if the cargo is empty.
int count(void) const
Count all items in the cargo.
itemCargo_t * get(const objDef_t *od) const
Returns a cargo item by its object definition.
int getLooseAmount(const objDef_t *od) const
Returns amount of loose item in the cargo.
linkedList_t * list(void) const
Returns a copy of the cargo list.
virtual bool add(const objDef_t *od, int amount, int looseAmount)
Add items to the cargo.
int getAmount(const objDef_t *od) const
Returns amount of an item in the cargo.
Defines all attributes of objects used in the inventory.