Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("apis/drawing")
- os.loadAPI("apis/nir")
- os.loadAPI("apis/sync")
- sync.redirect(true)
- sync.addMonitor("top")
- sync.useMaxSize(true)
- drawing.resetScreen()
- drawing.drawRect({2,2},{23,10},colors.green,false)
- drawing.writeText("Reaktor",{4,2},colors.lime)
- drawing.writeText("Status:",{4,4},colors.white)
- drawing.writeText("Hitze:",{4,5},colors.white)
- drawing.writeText("Max.:",{4,6},colors.white)
- drawing.writeText("Rest:",{4,7},colors.white)
- drawing.writeText("Output:",{4,8},colors.white)
- drawing.drawRect({25,2},{46,7},colors.red,false)
- drawing.writeText("MFSU Base",{27,2},colors.orange)
- drawing.writeText("Energie:",{27,4},colors.white)
- drawing.writeText("Max.:",{27,5},colors.white)
- drawing.drawRect({25,9},{46,14},colors.red,false)
- drawing.writeText("MFSU Reaktor",{27,9},colors.orange)
- drawing.writeText("Energie:",{27,11},colors.white)
- drawing.writeText("Max.:",{27,12},colors.white)
- drawing.update()
- while true do
- nir.find()
- local reactor = nir.sensors.right[1]
- term.setCursorPos(12,4)
- if reactor.enabled then
- term.write("Online")
- else
- term.write("Offline")
- end
- term.setCursorPos(12,5)
- term.write(string.format("%i",reactor.heat))
- term.setCursorPos(12,6)
- term.write(string.format("%i",reactor.maxHeat))
- local hours = math.floor(reactor.timeLeft / 60 / 60)
- local minutes = math.floor((reactor.timeLeft - hours * 60 * 60) / 60)
- local seconds = reactor.timeLeft - hours * 60 * 60 - minutes * 60
- term.setCursorPos(12,7)
- term.write(hours .. "h " .. minutes .. "m " .. seconds .. "s")
- term.setCursorPos(12,8)
- term.write(string.format("%i",reactor.output))
- local nir2 = peripheral.wrap("right")
- local uuid,state,title,mfsu1 = nir2.get(2)
- term.setCursorPos(36,4)
- term.write(string.format("%i",mfsu1.energyL))
- term.setCursorPos(36,5)
- term.write(string.format("%i",mfsu1.maxStorageL))
- local uuid,state,title,mfsu2 = nir2.get(3)
- term.setCursorPos(36,11)
- term.write(string.format("%i",mfsu2.energyL))
- term.setCursorPos(36,12)
- term.write(string.format("%i",mfsu2.maxStorageL))
- os.startTimer(1)
- os.pullEvent("timer")
- end
- sync.restore()
Advertisement
Add Comment
Please, Sign In to add comment