Advertisement
Hastwell

Tank Dispenser Prototype

Oct 21st, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. local tankName = 'openblocks_tank_0'
  2. local tank = peripheral.wrap(tankName)
  3.  
  4. local function tankInfo()
  5. -- available keys are rawName (localized name), amount (mB), capacity (mB), name (internal name), id (liquid id)
  6. return tank.getTankInfo('')[1]
  7. end
  8.  
  9. rs.setOutput('back',true)
  10. while tankInfo() == nil or tankInfo().amount == nil or tankInfo().amount < 8000 do
  11. sleep(0.2)
  12. end
  13. rs.setOutput('back',false)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement