Advertisement
AnonGaming

Untitled

Mar 2nd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 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,"5")
  11. data = sensors.getProbes(ctrl,reactorSensor)
  12. eustorageProbe = data[3]
  13. data1 = sensors.getAvailableTargetsforProbe(ctrl,reactorSensor,eustorageProbe)
  14. print("")
  15.  
  16. local cursorY = 2
  17. print(#data)
  18.  
  19.  
  20.  
  21. for k,v in pairs(data1) do
  22.  
  23. mfsuTarget = data1[k]
  24.  
  25. if mfsuTarget then
  26.  
  27. if string.find(mfsuTarget,"MFSU") then
  28. sensors.setTarget(ctrl,reactorSensor,mfsuTarget)
  29. data = sensors.getSensorReadingAsDict(ctrl,reactorSensor,mfsuTarget,eustorageProbe)
  30. mon.setCursorPos(1, cursorY)
  31. mon.write("MFSU EU:"..data.energy)
  32. mon.setCursorPos(1, cursorY+1)
  33. mon.write("MFSU Out:"..data.output)
  34.  
  35. cursorY = cursorY + 3
  36. end
  37. end
  38.  
  39. end
  40.  
  41.  
  42. sleep(1)
  43.  
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement