|
|
|
@ -5,6 +5,8 @@ local nav = require("navigator")
|
|
|
|
|
local scanner = require("scanner")
|
|
|
|
|
local torch = require("torch")
|
|
|
|
|
|
|
|
|
|
TORCH_INTERVAL = 9
|
|
|
|
|
|
|
|
|
|
local function mine_single()
|
|
|
|
|
robot.swing()
|
|
|
|
|
|
|
|
|
@ -28,8 +30,8 @@ local function mine_n(count, place_torches)
|
|
|
|
|
break
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- place a torch every 11 blocks to keep the tunnel lit
|
|
|
|
|
if i % 11 == 0 and place_torches then
|
|
|
|
|
-- place a torch every x blocks to keep the tunnel lit
|
|
|
|
|
if i % TORCH_INTERVAL == 0 and place_torches then
|
|
|
|
|
torch.place_torch(sides.right)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
@ -65,8 +67,8 @@ local function mine(scan_depth)
|
|
|
|
|
robot.turnRight()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- place a torch every 11 blocks to keep the tunnel lit
|
|
|
|
|
if moved_rows % 11 == 0 then
|
|
|
|
|
-- place a torch every x blocks to keep the tunnel lit
|
|
|
|
|
if moved_rows % TORCH_INTERVAL == 0 then
|
|
|
|
|
torch.place_torch(sides.left)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|