Configure how often to place torches

master v3_geolyzer
D4VID 10 months ago
parent 4885b48fe8
commit 736d377194

@ -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

Loading…
Cancel
Save