SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local signalSide = "bottom" |
| 1 | + | local signalSide = "left" |
| 2 | local drum = peripheral.wrap("front")
| |
| 3 | - | local rTank = peripheral.wrap("back")
|
| 3 | + | --local rTank = peripheral.wrap("back")
|
| 4 | - | local limit = -256000 |
| 4 | + | --local limit = -256000 |
| 5 | --local limit = -3500000 | |
| 6 | local tank, rtank | |
| 7 | ||
| 8 | while true do | |
| 9 | - | rtank = rTank.getTankInfo("in")
|
| 9 | + | --rtank = rTank.getTankInfo("in")
|
| 10 | - | if(rtank and rtank[1] and rtank[1].amount-rtank[1].capacity >= limit) then |
| 10 | + | --if(rtank and rtank[1] and rtank[1].amount-rtank[1].capacity >= limit) then |
| 11 | - | print("Trying to place new drum.")
|
| 11 | + | |
| 12 | if not turtle.detect() then | |
| 13 | print("Trying to place new drum.")
| |
| 14 | --encourage block placer to do his job | |
| 15 | redstone.setOutput(signalSide,true) | |
| 16 | sleep(1) | |
| 17 | redstone.setOutput(signalSide,false) | |
| 18 | end | |
| 19 | --end | |
| 20 | if turtle.detect() then | |
| 21 | drum = peripheral.wrap("front")
| |
| 22 | if drum then | |
| 23 | tank = drum.getTankInfo("in")
| |
| 24 | if(tank and tank[1] and tank[1].amount-tank[1].capacity>=0) then | |
| 25 | - | -- redstone.setOutput(signalSide,true) |
| 25 | + | |
| 26 | - | -- sleep(1) |
| 26 | + | redstone.setOutput(signalSide,true) |
| 27 | - | -- redstone.setOutput(signalSide,false) |
| 27 | + | sleep(1) |
| 28 | redstone.setOutput(signalSide,false) | |
| 29 | end | |
| 30 | end | |
| 31 | - | sleep(30) |
| 31 | + | |
| 32 | sleep(10) | |
| 33 | end |