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

Method canTake

source/game/StarItemDrop.cpp:345–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343}
344
345bool ItemDrop::canTake() const {
346 return m_mode.get() == Mode::Available && m_owningEntity.get() == NullEntityId && !m_item->empty();
347}
348
349ItemPtr ItemDrop::takeBy(EntityId entityId, float timeOffset) {
350 if (canTake()) {

Callers 4

updateMethod · 0.80
updateMethod · 0.80
handleIncomingPacketsMethod · 0.80
takeItemDropMethod · 0.80

Calls 2

getMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected