From 6db34bc4f9fb6cdb6a7c4e4dcec29610b92d6500 Mon Sep 17 00:00:00 2001 From: kepler155c Date: Thu, 8 Nov 2018 10:26:20 -0500 Subject: [PATCH] scanning miner fixes --- miners/scanningMiner.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/miners/scanningMiner.lua b/miners/scanningMiner.lua index 64ff752..59175a3 100644 --- a/miners/scanningMiner.lua +++ b/miners/scanningMiner.lua @@ -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'