Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- mon = peripheral.wrap("top")
- mon.clear()
- mon.setTextScale(2)
- ctrl = sensors.getController()
- data = sensors.getSensors(ctrl)
- reactorSensor = data[1]
- data = sensors.getSensorInfo(ctrl,reactorSensor)
- sensors.setSensorRange(ctrl,reactorSensor,"2")
- data = sensors.getProbes(ctrl,reactorSensor)
- eustorageProbe = data[3]
- data = sensors.getAvailableTargetsforProbe(ctrl,reactorSensor,eustorageProbe)
- local cursorY = 2
- print("2")
- for k,v in pairs(data) do
- mfsuTarget = data[1]
- if mfsuTarget !== nil then
- if string.find(mfsuTarget,"MFSU") then
- sensors.setTarget(ctrl,reactorSensor,mfsuTarget)
- data = sensors.getSensorReadingAsDict(ctrl,reactorSensor,mfsuTarget,eustorageProbe)
- mon.setCursorPos(1, cursorY)
- mon.write("MFSU EU:"..data.energy)
- mon.setCursorPos(1, cursorY+1)
- mon.write("MFSU Out:"..data.output)
- cursorY = cursorY + 2
- print(cursorY)
- end
- end
- end
- print("1")
- sleep(1)
- print("Restart")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement