UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
invDef_s Struct Reference

inventory definition for our menus More...

#include <inv_shared.h>

Public Member Functions

bool isArmourDef () const
 Checks whether a given inventory definition is of special type. More...
 
bool isFloorDef () const
 Checks whether the inventory definition is the floor. More...
 
bool isRightDef () const
 Checks whether the inventory definition is the right Hand. More...
 
bool isLeftDef () const
 Checks whether a given inventory definition is of special type. More...
 
bool isEquipDef () const
 Checks whether a given inventory definition is of special type. More...
 

Data Fields

char name [MAX_VAR]
 
containerIndex_t id
 
bool single
 
bool armour
 
bool implant
 
bool headgear
 
bool all
 
bool unique
 
bool temp
 
bool scroll
 
uint32_t shape [SHAPE_BIG_MAX_HEIGHT]
 
int in
 
int out
 

Detailed Description

inventory definition for our menus

Definition at line 371 of file inv_shared.h.

Member Function Documentation

bool invDef_t::isArmourDef ( ) const

Checks whether a given inventory definition is of special type.

Returns
true if the given inventory definition is of type armour

Definition at line 84 of file inv_shared.cpp.

References CID_ARMOUR.

Referenced by InventoryInterface::moveInInventory().

bool invDef_t::isEquipDef ( ) const

Checks whether a given inventory definition is of special type.

Returns
true if the given inventory definition is of type equip

Definition at line 75 of file inv_shared.cpp.

References CID_EQUIP.

Referenced by Inventory::canHoldItem(), InventoryInterface::moveInInventory(), and uiContainerNode::onDndMove().

bool invDef_t::isFloorDef ( ) const

Checks whether the inventory definition is the floor.

Returns
true if the given inventory definition is of type floor

Definition at line 48 of file inv_shared.cpp.

References CID_FLOOR.

Referenced by Inventory::canHoldItem(), G_ActorInvMove(), InventoryInterface::moveInInventory(), and uiContainerNode::onDndMove().

bool invDef_t::isLeftDef ( ) const

Checks whether a given inventory definition is of special type.

Returns
true if the given inventory definition is of type left

Definition at line 66 of file inv_shared.cpp.

References CID_LEFT.

Referenced by Inventory::canHoldItem(), G_ActorInvMove(), G_ActorReload(), InventoryInterface::moveInInventory(), and UI_ContainerNodeDrawSingle().

bool invDef_t::isRightDef ( ) const

Checks whether the inventory definition is the right Hand.

Returns
true if the given inventory definition is of type right

Definition at line 57 of file inv_shared.cpp.

References CID_RIGHT.

Referenced by Inventory::canHoldItem(), G_ActorInvMove(), InventoryInterface::moveInInventory(), and UI_ContainerNodeDrawSingle().

Field Documentation

bool invDef_s::all

Every item type can be stored in this container.

Definition at line 379 of file inv_shared.h.

Referenced by Inventory::canHoldItem().

bool invDef_s::armour

Only armour can be stored in this container.

Definition at line 376 of file inv_shared.h.

Referenced by Inventory::canHoldItem(), and InventoryInterface::moveInInventory().

bool invDef_s::headgear

Only headgear items can be stored in this container.

Definition at line 378 of file inv_shared.h.

Referenced by Inventory::canHoldItem(), and InventoryInterface::moveInInventory().

bool invDef_s::implant

Only implants can be stored in this container.

Definition at line 377 of file inv_shared.h.

Referenced by Inventory::canHoldItem(), and InventoryInterface::moveInInventory().

int invDef_s::in
int invDef_s::out
bool invDef_s::scroll

Scroll information.

See also
Inventory Set if the container is scrollable

Definition at line 383 of file inv_shared.h.

Referenced by Inventory::canHoldItem(), Inventory::findSpace(), Inventory::getItemAtPos(), INVSH_CheckToInventory_shape(), and InventoryInterface::moveInInventory().

uint32_t invDef_s::shape[SHAPE_BIG_MAX_HEIGHT]

The inventory form/shape.

Definition at line 384 of file inv_shared.h.

Referenced by INVSH_CheckToInventory_shape(), and uiContainerNode::onLoaded().

bool invDef_s::single

Type of this container or inventory. Just a single item can be stored in this container.

Definition at line 375 of file inv_shared.h.

Referenced by InventoryInterface::addToInventory(), Inventory::canHoldItem(), G_ClientShoot(), Inventory::getItemAtPos(), InventoryInterface::moveInInventory(), uiContainerNode::onDndMove(), and InventoryInterface::removeFromInventory().

bool invDef_s::unique

Does not allow to put the same item more than once into the container

Definition at line 380 of file inv_shared.h.

Referenced by Inventory::canHoldItem().


The documentation for this struct was generated from the following files: