Advertisement
AnonGaming

Untitled

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