Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.find("monitor")
- local reactor = peripheral.wrap("uraninite_reactor_0") -- your actual reactor name
- -- Safety checks
- if not monitor then
- print("Monitor not found!")
- return
- end
- if not reactor then
- print("Reactor not found!")
- return
- end
- monitor.setTextScale(0.5)
- monitor.setBackgroundColor(colors.black)
- monitor.setTextColor(colors.white)
- local function writeLine(y, text)
- monitor.setCursorPos(1, y)
- monitor.write(text)
- end
- while true do
- local energy = reactor.getStoredEnergy() or 0
- local max = 80000000 -- replace with actual capacity if needed
- local percent = (energy / max) * 100
- local status = reactor.getStatus and reactor.getStatus() or "Unknown"
- local efficiency = reactor.getEfficiency and reactor.getEfficiency() or 0
- local input = reactor.getLastInput and reactor.getLastInput() or 0
- local output = reactor.getLastOutput and reactor.getLastOutput() or 0
- monitor.clear()
- writeLine(1, "=== POWAH REACTOR STATUS ===")
- writeLine(3, string.format("Stored: %.2f MFE", energy / 1e6))
- writeLine(4, string.format("Capacity: %.2f MFE", max / 1e6))
- writeLine(5, string.format("Fullness: %.1f%%", percent))
- writeLine(6, string.format("Status: %s", status))
- writeLine(7, string.format("Efficiency: %.2f%%", efficiency * 100))
- writeLine(8, string.format("Input: %.2f FE/t", input))
- writeLine(9, string.format("Output: %.2f FE/t", output))
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement