Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 1 - glass
- -- 2 - black
- -- 3 - red
- Slots = {
- {
- {2, 3, 3, 2},
- {3, 0, 0, 3},
- {3, 0, 0, 3},
- {2, 3, 3, 2}
- },
- {
- {3, 0, 0, 3},
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- {3, 0, 0, 3}
- }
- }
- for layer = 1, #Slots do
- -- From 1 to number of elements in Slots (2)
- for line = 1, #Slots[layer] do
- -- When program starts line == 1
- -- From 1 to number of elements
- -- in line number `line` (7)
- -- On the second time line == 2
- for elem = 1, #Slots[layer][line] do
- -- When program starts elem == 1
- -- Then Slots[line][elem] == Slots[1][1] == 1
- -- On the second time
- -- elem == 2
- -- Then Slots[line][elem] == Slots[2][1] == 1
- slot = Slots[line][elem]
- if slot ~= 0 then
- turtle.select(slot)
- turtle.placeDown()
- end
- turtle.forward()
- end
- for turt = 1, #Slots[line] do
- turtle.back()
- end
- turtle.up()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- for i = 1, #Slots do
- turtle.down()
- end
- end
Add Comment
Please, Sign In to add comment