Advertisement
AnonGaming

Untitled

Mar 2nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.59 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.     data = sensors.getAvailableTargetsforProbe(ctrl,reactorSensor,eustorageProbe)
  14.    print("")
  15.    
  16.     local cursorY = 2
  17.     print(#data)
  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.                 print("1MFSU "..k)
  25.                 sensors.setTarget(ctrl,reactorSensor,mfsuTarget)
  26.                 print("2MFSU "..k)
  27.                 data = sensors.getSensorReadingAsDict(ctrl,reactorSensor,mfsuTarget,eustorageProbe)
  28.                 print("3MFSU "..k)
  29.                 mon.setCursorPos(1, cursorY)
  30.                 print("4MFSU "..k)
  31.                 mon.write("MFSU EU:"..data.energy)
  32.                 print("5MFSU "..k)
  33.                 mon.setCursorPos(1, cursorY+1)
  34.                 print("6MFSU "..k)
  35.                 mon.write("MFSU Out:"..data.output)
  36.                 print("7MFSU "..k)
  37.                
  38.                 print("8MFSU EU:"..data.energy)
  39.                 print("9MFSU "..k)
  40.                 print("10MFSU Out:"..data.output)
  41.                 print("11MFSU "..k)
  42.                
  43.                 cursorY = cursorY + 2
  44.             end
  45.         end
  46.        
  47.     end
  48.     sleep(1)
  49.    
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement