UFO: Alien Invasion
Loading...
Searching...
No Matches
invDef_t Struct Reference

inventory definition for our menus More...

#include <inv_shared.h>

Collaboration diagram for invDef_t:
Collaboration graph

Public Member Functions

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

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

◆ isArmourDef()

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().

◆ isEquipDef()

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().

◆ isFloorDef()

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().

◆ isLeftDef()

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().

◆ isRightDef()

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

◆ all

bool invDef_t::all

Every item type can be stored in this container.

Definition at line 379 of file inv_shared.h.

Referenced by Inventory::canHoldItem().

◆ armour

bool invDef_t::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().

◆ headgear

bool invDef_t::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().

◆ id

◆ implant

bool invDef_t::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().

◆ in

int invDef_t::in

◆ name

◆ out

int invDef_t::out

◆ scroll

bool invDef_t::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().

◆ shape

uint32_t invDef_t::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().

◆ single

bool invDef_t::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().

◆ temp

bool invDef_t::temp

◆ unique

bool invDef_t::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: