Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local hvState
- local hvCount
- local data
- moni = peripheral.wrap("top")
- while (true) do
- dataStack = peripheral.call("back","getAllStacks")
- dataHeat = peripheral.call("back","getHeat")/100
- dataEU = peripheral.call("back","getEUOutput")*5
- hvState = 0
- hvCount = 0
- for i=1, 42 do
- if dataStack[i] ~= nil then
- if dataStack[i]["rawName"] == "ic2.reactorventgold" then
- hvCount = hvCount + 1
- if dataStack[i]["dmg"] <= 0 then
- hvState = hvState + 1
- elseif dataStack[i]["dmg"] > 8000 then
- rs.setOutput("right",false)
- end
- end
- end
- end
- if (hvCount == hvState) and (hvCount > 0) and (dataHeat < 10) then
- rs.setOutput("right", true)
- end
- moni.clear()
- moni.setCursorPos(1,1)
- moni.write("Cooled HV: " ..hvState .."/" ..hvCount)
- moni.setCursorPos(1,2)
- moni.write("Heat: " ..dataHeat .."%")
- moni.setCursorPos(1,3)
- moni.write("EU/t: " ..dataEU)
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement