|
|
@ -49,6 +49,7 @@ file:close()
|
|
|
|
local inverted = false
|
|
|
|
local inverted = false
|
|
|
|
|
|
|
|
|
|
|
|
robot.select(1)
|
|
|
|
robot.select(1)
|
|
|
|
|
|
|
|
local inventorySize = robot.inventorySize()
|
|
|
|
|
|
|
|
|
|
|
|
-- build:
|
|
|
|
-- build:
|
|
|
|
nav.forward(radius)
|
|
|
|
nav.forward(radius)
|
|
|
@ -65,7 +66,18 @@ for _, ring in ipairs(rings) do
|
|
|
|
for _ = 1, n do
|
|
|
|
for _ = 1, n do
|
|
|
|
robot.placeDown()
|
|
|
|
robot.placeDown()
|
|
|
|
if robot.count() == 0 then
|
|
|
|
if robot.count() == 0 then
|
|
|
|
robot.select(robot.select() + 1) -- select the next item slot
|
|
|
|
local current_slot = robot.select()
|
|
|
|
|
|
|
|
if current_slot == inventorySize then
|
|
|
|
|
|
|
|
print('Waiting for more materials')
|
|
|
|
|
|
|
|
local _ = io.read()
|
|
|
|
|
|
|
|
robot.select(1)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
robot.select(current_slot + 1) -- select the next item slot
|
|
|
|
|
|
|
|
if robot.count() == 0 then
|
|
|
|
|
|
|
|
print('Waiting for more materials')
|
|
|
|
|
|
|
|
local _ = io.read()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
nav.forward()
|
|
|
|
nav.forward()
|
|
|
|
end
|
|
|
|
end
|
|
|
|