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

Method startCrafting

source/game/objects/StarContainerObject.cpp:330–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330void ContainerObject::startCrafting() {
331 if (isSlave()) {
332 world()->sendEntityMessage(entityId(), "startCrafting");
333 } else {
334 if (m_crafting.get())
335 return;
336 auto inputItems = m_items->items();
337 inputItems.removeLast();
338 m_goalRecipe = recipeForMaterials(inputItems);
339 m_crafting.set(true);
340 itemsUpdated();
341 // tickCrafting validates
342 }
343}
344
345void ContainerObject::stopCrafting() {
346 if (isSlave()) {

Callers

nothing calls this directly

Calls 5

itemsMethod · 0.80
sendEntityMessageMethod · 0.45
getMethod · 0.45
removeLastMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected