Upload files to 'crop-farm'

This commit is contained in:
Jan 2021-06-13 14:00:15 +00:00
parent 893bd7ca49
commit ffbaeb3a71

View file

@ -25,24 +25,7 @@ function refuel()
end
end
print("Started. "..HEIGHT.."x"..WIDTH.." area; Growth level "..GROWTH_MAX..".")
-- Pull fuel from attached top inventory
if true then
turtle.select(1)
local data = turtle.getItemDetail()
if data then
local count = 64 - data.count
if count > 0 then
turtle.suckUp(count)
end
end
end
local turnLeft = false
for i = 0, WIDTH - 1 do
for j = 0, HEIGHT - 1 do
function farm()
refuel()
turtle.forward()
@ -70,6 +53,27 @@ for i = 0, WIDTH - 1 do
end
end
print("Started. "..HEIGHT.."x"..WIDTH.." area; Growth level "..GROWTH_MAX..".")
-- Pull fuel from attached top inventory
if true then
turtle.select(1)
local data = turtle.getItemDetail()
if data then
local count = 64 - data.count
if count > 0 then
turtle.suckUp(count)
end
end
end
local turnLeft = false
for i = 0, WIDTH - 1 do
for j = 0, HEIGHT - 1 do
farm()
end
if i ~= WIDTH - 1 then
if turnLeft then
turtle.turnLeft()
@ -77,7 +81,7 @@ for i = 0, WIDTH - 1 do
turtle.turnLeft()
else
turtle.turnRight()
turtle.forward()
farm()
turtle.turnRight()
end
turnLeft = not turnLeft