fix(coal-crafter): implement strictTransferOne
This commit is contained in:
parent
98cb51510f
commit
e02a7a70c2
@ -19,16 +19,26 @@ local function waitForCoalEssence(inventory)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function strictTransferOne(slot)
|
||||||
|
local ok = turtle.transferTo(slot, 1)
|
||||||
|
|
||||||
|
if not ok then
|
||||||
|
error('cannot transfer item')
|
||||||
|
end
|
||||||
|
|
||||||
|
return ok
|
||||||
|
end
|
||||||
|
|
||||||
local function prepareCraftShape()
|
local function prepareCraftShape()
|
||||||
turtle.transferTo(2, 1)
|
strictTransferOne(2)
|
||||||
turtle.transferTo(3, 1)
|
strictTransferOne(3)
|
||||||
|
|
||||||
turtle.transferTo(5, 1)
|
strictTransferOne(5)
|
||||||
turtle.transferTo(7, 1)
|
strictTransferOne(7)
|
||||||
|
|
||||||
turtle.transferTo(9, 1)
|
strictTransferOne(9)
|
||||||
turtle.transferTo(10, 1)
|
strictTransferOne(10)
|
||||||
turtle.transferTo(11, 1)
|
strictTransferOne(11)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function craft()
|
local function craft()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user