SHOW:
|
|
- or go back to the newest paste.
| 1 | -- 0 - air | |
| 2 | -- 1 - black | |
| 3 | -- 2 - red | |
| 4 | ||
| 5 | -- | |
| 6 | art = {
| |
| 7 | {1,2,2,1},
| |
| 8 | {2,0,0,2},
| |
| 9 | {2,0,0,2},
| |
| 10 | {1,2,2,1},
| |
| 11 | } | |
| 12 | ||
| 13 | ||
| 14 | function buildLine(line) | |
| 15 | for element = 1,#line do | |
| 16 | slot = line[element] | |
| 17 | - | if slot ~= 0 Then |
| 17 | + | if slot ~= 0 then |
| 18 | turtle.select(slot) | |
| 19 | turtle.placeDown() | |
| 20 | end | |
| 21 | turtle.forward() | |
| 22 | end | |
| 23 | ||
| 24 | for w = 1,#line do | |
| 25 | turtle.back() | |
| 26 | end | |
| 27 | end | |
| 28 | ||
| 29 | function buildImage(image) | |
| 30 | for stroka = 1,#image do | |
| 31 | buildLine(image[stroka]) | |
| 32 | turtle.turnRight() | |
| 33 | turtle.forward() | |
| 34 | turtle.turnLeft() | |
| 35 | end | |
| 36 | end | |
| 37 | ||
| 38 | buildImage(art) | |
| 39 |