fix(coal-crafter): implement strictTransferOne
This commit is contained in:
parent
98cb51510f
commit
e02a7a70c2
@ -19,16 +19,26 @@ local function waitForCoalEssence(inventory)
|
||||
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()
|
||||
turtle.transferTo(2, 1)
|
||||
turtle.transferTo(3, 1)
|
||||
strictTransferOne(2)
|
||||
strictTransferOne(3)
|
||||
|
||||
turtle.transferTo(5, 1)
|
||||
turtle.transferTo(7, 1)
|
||||
strictTransferOne(5)
|
||||
strictTransferOne(7)
|
||||
|
||||
turtle.transferTo(9, 1)
|
||||
turtle.transferTo(10, 1)
|
||||
turtle.transferTo(11, 1)
|
||||
strictTransferOne(9)
|
||||
strictTransferOne(10)
|
||||
strictTransferOne(11)
|
||||
end
|
||||
|
||||
local function craft()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user