SHOW:
|
|
- or go back to the newest paste.
| 1 | SAFE_SLOTS = 1 | |
| 2 | LAST_FILLER_SLOT = 8 | |
| 3 | SLOT_COUNT = 16 | |
| 4 | ||
| 5 | function selectFiller() | |
| 6 | for slot = SAFE_SLOTS + 1, SLOT_COUNT do | |
| 7 | turtle.select(slot) | |
| 8 | if turtle.compareTo(2) and turtle.getItemCount() > 1 then | |
| 9 | return | |
| 10 | end | |
| 11 | end | |
| 12 | end | |
| 13 | ||
| 14 | function placeFiller(direction) | |
| 15 | if direction == nil then | |
| 16 | direction = '' | |
| 17 | end | |
| 18 | ||
| 19 | while turtle['detect' .. direction]() do | |
| 20 | turtle['dig' .. direction]() | |
| 21 | end | |
| 22 | selectFiller() | |
| 23 | turtle['place' .. direction]() | |
| 24 | end | |
| 25 | ||
| 26 | - | function clear(direction) |
| 26 | + | |
| 27 | for i = 1, 4 do | |
| 28 | for x = 1, width do | |
| 29 | placeFiller('Down')
| |
| 30 | turtle.forward() | |
| 31 | end | |
| 32 | - | selectFiller() |
| 32 | + | |
| 33 | - | turtle['place' .. direction]() |
| 33 | + | |
| 34 | ||
| 35 | turtle.up() | |
| 36 | ||
| 37 | dropNonFuel() | |
| 38 | - | function move(direction) |
| 38 | + | |
| 39 | - | clear(direction) |
| 39 | + | |
| 40 | for i = 1,24 do | |
| 41 | - | if direction == nil or direction == '' then |
| 41 | + | |
| 42 | - | turtle.forward() |
| 42 | + |