Advertisement
AnonGaming

Untitled

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