scanning miner fixes

This commit is contained in:
kepler155c
2018-11-08 10:26:20 -05:00
parent 3098cd86bf
commit 6db34bc4f9

View File

@@ -314,7 +314,13 @@ end
local function equip(side, item)
if not turtle.equip(side, item) then
turtle.selectSlotWithQuantity(0)
if not turtle.selectSlotWithQuantity(0) then
ejectTrash()
end
if not turtle.selectSlotWithQuantity(0) then
turtle.select(16)
turtle.drop()
end
turtle.equip(side)
if not turtle.equip(side, item) then
error('Unable to equip ' .. item)
@@ -350,6 +356,9 @@ local function scan()
(b.action == 'liquid_fuel' and b.y <= bedrock) then
return false
elseif b.action == 'liquid_fuel' and b.damage > 0 then
return false
elseif b.y >= bedrock then
b.action = dictionary:get(b.name, b.metadata) or 'mine'