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

Method giveItem

source/game/StarPlayer.cpp:1245–1248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1243}
1244
1245void Player::giveItem(ItemPtr const& item) {
1246 if (auto spill = pickupItems(item))
1247 world()->addEntity(ItemDrop::createRandomizedDrop(spill->descriptor(), position()));
1248}
1249
1250void Player::triggerPickupEvents(ItemPtr const& item) {
1251 if (item) {

Callers 7

completeMethod · 0.80
makePlayerCallbacksMethod · 0.80
craftMethod · 0.80
giveContainerResultMethod · 0.80
updateMethod · 0.80
dismissedMethod · 0.80
buyMethod · 0.80

Calls 5

singletonClass · 0.85
itemDatabaseMethod · 0.80
addEntityMethod · 0.45
descriptorMethod · 0.45
itemMethod · 0.45

Tested by

no test coverage detected