-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfram.lua
More file actions
35 lines (29 loc) · 719 Bytes
/
Copy pathfram.lua
File metadata and controls
35 lines (29 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require("./lib/turtle")
local function rectFarmAsm(x, y) -- снос прямоугольной фермы x*y
local function harvest() -- собирает и ставит урожай
if Lib.plantGrownDown() then
turtle.digDown()
turtle.placeDown()
end
turtle.forward()
end
for i = 1, y do
for j = 1, x do
harvest()
end
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
end
if y % 2 then
Lib.turnBack()
for i = 1, x do
turtle.forward()
end
end
turtle.turnLeft()
for i = 1, y do
turtle.forward()
end
turtle.turnLeft()
end