Advertisement
AnonGaming

Untitled

Mar 2nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. while true do
  2.  
  3. mon = peripheral.wrap("top")
  4. mon.clear()
  5. mon.setTextScale(2)
  6. ctrl = sensors.getController()
  7. data = sensors.getSensors(ctrl)
  8. reactorSensor = data[1]
  9. data = sensors.getSensorInfo(ctrl,reactorSensor)
  10. sensors.setSensorRange(ctrl,reactorSensor,"2")
  11. data = sensors.getProbes(ctrl,reactorSensor)
  12. eustorageProbe = data[3]
  13. data = sensors.getAvailableTargetsforProbe(ctrl,reactorSensor,eustorageProbe)
  14.  
  15.  
  16. local cursorY = 2
  17. print("2")
  18. for k,v in pairs(data) do
  19. mfsuTarget = data[k]
  20.  
  21. if mfsuTarget then
  22.  
  23. if string.find(mfsuTarget,"MFSU") then
  24.  
  25. sensors.setTarget(ctrl,reactorSensor,mfsuTarget)
  26. data = sensors.getSensorReadingAsDict(ctrl,reactorSensor,mfsuTarget,eustorageProbe)
  27. mon.setCursorPos(1, cursorY)
  28. mon.write("MFSU EU:"..data.energy)
  29. mon.setCursorPos(1, cursorY+1)
  30. mon.write("MFSU Out:"..data.output)
  31. cursorY = cursorY + 2
  32. print(cursorY)
  33. end
  34. end
  35. end
  36. print("1")
  37. sleep(1)
  38.  
  39. print("Restart")
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement