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

Method consumeCurrency

source/game/StarPlayerInventory.cpp:644–651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642}
643
644bool PlayerInventory::consumeCurrency(String const& currencyType, uint64_t amount) {
645 if (m_currencies[currencyType] >= amount) {
646 m_currencies[currencyType] -= amount;
647 return true;
648 } else {
649 return false;
650 }
651}
652
653Maybe<InventorySlot> PlayerInventory::customBarPrimarySlot(CustomBarIndex customBarIndex) const {
654 return m_customBar.at(m_customBarGroup, customBarIndex).first;

Callers 4

reviveMethod · 0.80
makePlayerCallbacksMethod · 0.80
consumeIngredientsMethod · 0.80
buyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected