Upload files to 'crop-farm'
This commit is contained in:
parent
893bd7ca49
commit
ffbaeb3a71
|
@ -25,25 +25,8 @@ 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
|
||||
refuel()
|
||||
function farm()
|
||||
refuel()
|
||||
turtle.forward()
|
||||
|
||||
local success, data = turtle.inspectDown()
|
||||
|
@ -68,6 +51,27 @@ for i = 0, WIDTH - 1 do
|
|||
turtle.select(2)
|
||||
turtle.placeDown()
|
||||
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
|
||||
|
@ -77,7 +81,7 @@ for i = 0, WIDTH - 1 do
|
|||
turtle.turnLeft()
|
||||
else
|
||||
turtle.turnRight()
|
||||
turtle.forward()
|
||||
farm()
|
||||
turtle.turnRight()
|
||||
end
|
||||
turnLeft = not turnLeft
|
||||
|
|
Loading…
Reference in a new issue