View difference between Paste ID: 74PCKksY and MCUjTpc9
SHOW: | | - or go back to the newest paste.
1
-- 1 - glass
2
-- 2 - black
3
-- 3 - red
4
Slots = {
5-
	{1, 1, 1, 2, 1, 1, 1},
5+
	{
6-
    {1, 1, 2, 3, 2, 1, 1},
6+
        {2, 3, 3, 2},
7-
    {1, 2, 3, 3, 3, 2, 1},
7+
        {3, 0, 0, 3},
8-
    {2, 3, 3, 3, 3, 3, 2},
8+
        {3, 0, 0, 3},
9-
    {2, 3, 3, 2, 3, 3, 2},
9+
        {2, 3, 3, 2}
10-
    {1, 2, 2, 1, 2, 2, 1}
10+
	},
11
	{
12
        {3, 0, 0, 3},
13-
for line = 1, #Slots do
13+
        {0, 0, 0, 0},
14-
    for elem = 1, #Slots[line] do
14+
        {0, 0, 0, 0},
15-
      turtle.select(Slots[line][elem])
15+
        {3, 0, 0, 3}
16-
      turtle.placeDown()
16+
    }
17-
      turtle.forward()
17+
18
19
20-
    for turt = 1, #Slots[line] do
20+
21-
      turtle.back()
21+
22
for layer = 1, #Slots do
23-
    turtle.up()
23+
    -- From 1 to number of elements in Slots (2)
24
    for line = 1, #Slots[layer] do
25
        -- When program starts line == 1
26
        -- From 1 to number of elements
27
        -- in line number `line` (7)
28
        -- On the second time line == 2
29
        for elem = 1, #Slots[layer][line] do
30
          -- When program starts elem == 1
31
          -- Then Slots[line][elem] == Slots[1][1] == 1
32
          -- On the second time
33
          -- elem == 2
34
          -- Then Slots[line][elem] == Slots[2][1] == 1
35
          slot = Slots[line][elem]
36
          if slot ~= 0 then
37
              turtle.select(slot)
38
              turtle.placeDown()
39
          end
40
          turtle.forward()
41
        end
42
43
        for turt = 1, #Slots[line] do
44
          turtle.back()
45
        end
46
        turtle.up()
47
    end
48
    turtle.turnRight()
49
    turtle.forward()
50
    turtle.turnLeft()
51
    for i = 1, #Slots do
52
       turtle.down()
53
    end
54
end