Advertisement
AnonGaming

Untitled

Mar 2nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. while true do
  2.  
  3. mon = peripheral.wrap("top")
  4. mon.clear()
  5. mon.setTextScale(1)
  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.."/"..data.maxStorage)
  32.  
  33. cursorY = cursorY + 1
  34. end
  35. end
  36.  
  37. end
  38.  
  39.  
  40. sleep(1)
  41.  
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement