Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- monitor = peripheral.wrap("right")
- reactor = peripheral.wrap("BigReactors-Reactor_0")
- print("Working...")
- function writeInGreen(message, x, y)
- monitor.setTextColor(colors.green)
- monitor.setCursorPos(x,y)
- monitor.write(message)
- monitor.setTextColor(colors.white)
- end
- function writeInRed(message, x, y)
- monitor.setTextColor(colors.red)
- monitor.setCursorPos(x,y)
- monitor.write(message)
- monitor.setTextColor(colors.white)
- end
- function writeInWhite(message, x, y)
- monitor.setTextColor(colors.white)
- monitor.setCursorPos(x,y)
- monitor.write(message)
- end
- function writeInYellow(message, x, y)
- monitor.setTextColor(colors.yellow)
- monitor.setCursorPos(x,y)
- monitor.write(message)
- monitor.setTextColor(colors.white)
- end
- ---Main code---
- while (true) do
- monitor.clear()
- monitor.setTextScale(1.5)
- writeInWhite("Power Status: ", 1, 1)
- if (reactor.getActive() == true) then
- writeInGreen("On", 15, 1)
- else
- writeInRed("Off", 15, 1)
- end
- writeInWhite("Fuel Temp: ", 1, 2)
- writeInYellow(reactor.getFuelTemperature(), 12, 2)
- writeInWhite("Casing Temp: ", 1, 3)
- writeInYellow(reactor.getCasingTemperature(), 14, 3)
- writeInWhite(" ", 1, 4)
- writeInWhite("Fuel Level (Ingots): ", 1, 5)
- if (reactor.getFuelAmount() >= reactor.getFuelAmountMax() / 4) then
- writeInGreen(reactor.getFuelAmount() / 1000, 22, 5)
- else
- writeInRed(reactor.getFuelAmount() / 1000, 22, 5)
- end
- writeInWhite("Waste Amount (Ingots): ", 1, 6)
- if (reactor.getWasteAmount() > reactor.getFuelAmountMax() / 4) then
- writeInRed(reactor.getWasteAmount() / 1000, 24, 6)
- else
- writeInGreen(reactor.getWasteAmount() / 1000, 24, 6)
- end
- writeInWhite("Fuel Reactivity: ", 1, 7)
- writeInYellow(reactor.getFuelReactivity(), 18, 7)
- writeInWhite("Fuel Consumed last Tick: ", 1, 8)
- writeInYellow(reactor.getFuelConsumedLastTick(), 26, 8)
- writeInWhite(" ", 1, 9)
- writeInWhite("Energy Stored: ", 1, 10)
- if (reactor.getEnergyStored() == 0) then
- writeInRed(string.format("%18.0f", reactor.getEnergyStored()), 16, 10)
- else
- writeInGreen(reactor.getEnergyStored(), 16, 10)
- end
- writeInWhite("Energy Produced Last Tick: ", 1 ,11)
- writeInYellow(reactor.getEnergyProducedLastTick(), 28, 11)
- sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment