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

Loading…
Cancel
Save