MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / GetTypeIDCount

Method GetTypeIDCount

Descent3/Inventory.cpp:1420–1430  ·  view source on GitHub ↗

returns how many of a type/id exists in the inventory

Source from the content-addressed store, hash-verified

1418
1419// returns how many of a type/id exists in the inventory
1420int Inventory::GetTypeIDCount(int type, int id) {
1421 inven_item *node = FindItem(type, id);
1422
1423 if (!node)
1424 return 0;
1425 if (node->flags & INVF_OBJECT) {
1426 return 1;
1427 }
1428
1429 return node->count;
1430}
1431
1432// determines whether the position is selectable
1433bool Inventory::IsSelectable(void) {

Callers 6

msafe_GetValueFunction · 0.80
HandleInventoryPowerupsFunction · 0.80
InvGetTypeIDCountFunction · 0.80
dInven_GetTypeIDCountFunction · 0.80
ThiefPlayerHasItemFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected