RTS_Dmitriy

Two layers

Oct 10th, 2025
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- 1 - obsidian
  2. -- 2 - quartz
  3.  
  4. art1={
  5.     {1,2,2,1},
  6.     {2,0,0,2},
  7.     {2,0,0,2},
  8.     {1,2,2,1}
  9. }
  10.  
  11. art2={
  12.     {2,0,0,2},
  13.     {0,0,0,0},
  14.     {0,0,0,0},
  15.     {2,0,0,2}
  16. }
  17.  
  18. function buildLine (colors)
  19.     for i = 1,#colors do
  20.         slot = colors[i]
  21.         if slot~=0 then
  22.           turtle.select(slot)
  23.           turtle.placeDown()
  24.         end
  25.         turtle.forward()
  26.     end
  27.     turtle.turnRight()
  28.     turtle.forward()
  29.     turtle.turnLeft()
  30.     for e = 1,#colors do
  31.         turtle.back()
  32.     end
  33. end
  34.  
  35. function buildLayer(image)
  36.     for i=1,#image do
  37.          line=image[i]
  38.          buildLine(line)
  39.     end
  40. end
  41.  
  42.  
  43. buildLayer(art1)
  44. buildLayer(art2)
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment