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

Method setCount

source/game/StarItem.cpp:74–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74uint64_t Item::setCount(uint64_t count, bool overfill) {
75 if (overfill)
76 m_count = count;
77 else
78 m_count = std::min(count, m_maxStack);
79 return count - m_count;
80}
81
82bool Item::stackableWith(ItemConstPtr const& item) const {
83 return item && name() == item->name() && parameters() == item->parameters();

Callers 4

takeMethod · 0.45
loadItemMethod · 0.45
tryCreateItemMethod · 0.45
buyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected