MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / getCountOfItem

Method getCountOfItem

source/game/StarItemDatabase.cpp:59–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57};
58
59uint64_t ItemDatabase::getCountOfItem(List<ItemPtr> const& bag, ItemDescriptor const& item, bool exactMatch) {
60 auto normalizedBag = normalizeBag(bag);
61 return getCountOfItem(normalizedBag, item, exactMatch);
62}
63
64uint64_t ItemDatabase::getCountOfItem(HashMap<ItemDescriptor, uint64_t> const& bag, ItemDescriptor const& item, bool exactMatch) {
65 ItemDescriptor matchItem = exactMatch ? item.singular() : ItemDescriptor(item.name(), 1);

Callers 4

itemCountMethod · 0.80
setupWidgetMethod · 0.80
setupTooltipMethod · 0.80
consumeIngredientsMethod · 0.80

Calls 5

ItemDescriptorClass · 0.85
singularMethod · 0.80
nameMethod · 0.45
containsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected