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

Method putItems

source/game/objects/StarContainerObject.cpp:253–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253RpcPromise<ItemPtr> ContainerObject::putItems(size_t pos, ItemPtr const& items) {
254 if (isSlave()) {
255 return world()->sendEntityMessage(entityId(), "putItems", {itemSafeDescriptor(items).toJson()}).wrap([](Json res) {
256 return Root::singleton().itemDatabase()->item(ItemDescriptor(res));
257 });
258 } else {
259 return RpcPromise<ItemPtr>::createFulfilled(doPutItems(pos, items));
260 }
261}
262
263RpcPromise<ItemPtr> ContainerObject::takeItems(size_t slot, size_t count) {
264 if (isSlave()) {

Callers 3

tickCraftingMethod · 0.45
doPutItemsMethod · 0.45
containerPutItemsAtMethod · 0.45

Calls 8

itemSafeDescriptorFunction · 0.85
singletonClass · 0.85
ItemDescriptorClass · 0.85
itemDatabaseMethod · 0.80
wrapMethod · 0.45
sendEntityMessageMethod · 0.45
toJsonMethod · 0.45
itemMethod · 0.45

Tested by

no test coverage detected