Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local GeneratingPwr = 1
- local HadEnough = 1
- while true do
- local reactor = peripheral.wrap("BigReactors-Reactor_0")
- local mon = peripheral.wrap("left")
- mon.clear()
- mon.setCursorPos(1,1)
- mon.setBackgroundColor(colors.cyan)
- mon.setTextColor(colors.black)
- mon.write("Xander is an idiot.")
- mon.setCursorPos(1,2)
- if reactor.getActive() == true then
- mon.setBackgroundColor(colors.green)
- mon.setTextColor(colors.white)
- mon.write("Reactor: Activated.")
- else
- mon.setBackgroundColor(colors.red)
- mon.setTextColor(colors.yellow)
- mon.write("Reactor: Deactivated.")
- end
- mon.setCursorPos(1,3)
- if reactor.getFuelAmount() > 5000 then
- mon.setBackgroundColor(colors.green)
- mon.setTextColor(colors.white)
- mon.write("Fuel: "..string.format(math.floor(reactor.getFuelAmount() / reactor.getFuelAmountMax() * 100)).."%")
- else
- mon.setBackgroundColor(colors.red)
- mon.setTextColor(colors.yellow)
- mon.write("Fuel: "..string.format(math.floor(reactor.getFuelAmount() / reactor.getFuelAmountMax() * 100)).."%")
- end
- mon.setCursorPos(1,4)
- mon.setBackgroundColor(colors.green)
- mon.setTextColor(colors.white)
- mon.write("RF/t: "..string.format(math.floor(reactor.getEnergyProducedLastTick())))
- mon.setCursorPos(1,5)
- mon.write("Control Rods Level: "..string.format(math.floor(reactor.getControlRodLevel(1) / 100)).."%")
- mon.setCursorPos(1,6)
- mon.write("Casing Temperature: "..string.format(math.floor(reactor.getCasingTemperature())))
- mon.setCursorPos(1,7)
- mon.write("Fuel Temperature: "..string.format(math.floor(reactor.getFuelTemperature())))
- if reactor.getEnergyStored() < 9500000 then
- if reactor.getFuelAmount() > 5000 then
- GeneratingPwr = 1
- else
- GeneratingPwr = 0
- end
- else
- GeneratingPwr = 0
- end
- mon.setCursorPos(1,8)
- mon.setBackgroundColor(colors.gray)
- mon.setTextColor(colors.white)
- mon.write(" ")
- mon.setCursorPos(1,8)
- mon.write(" Energy Stored ("..string.format(math.floor((reactor.getEnergyStored() / 10000000 ) * 100)).."%):")
- if GeneratingPwr == 1 then
- if HadEnough == 0 then
- reactor.setActive(true)
- else
- reactor.setActive(false)
- end
- else
- reactor.setActive(false)
- end
- if reactor.getEnergyStored() >= 9500000 then
- HadEnough = 1
- end
- if reactor.getEnergyStored() <= 1000000 then
- HadEnough = 0
- end
- mon.setCursorPos(1,10)
- mon.write(" ")
- mon.setCursorPos(1,9)
- mon.setBackgroundColor(colors.red)
- mon.write(" ")
- mon.setCursorPos(1,9)
- mon.setBackgroundColor(colors.green)
- for l = 1, (((reactor.getEnergyStored() / 10000000 ) * 100) * 0.36) do
- mon.write(" ")
- end
- mon.setCursorPos(1,11)
- mon.setBackgroundColor(colors.green)
- mon.setTextColor(colors.white)
- mon.write("Fuel/t: "..string.format(math.floor(reactor.getFuelConsumedLastTick())).."%")
- if HadEnough == 1 then
- mon.setCursorPos(1,12)
- mon.setBackgroundColor(colors.green)
- mon.setTextColor(colors.white)
- mon.write("Energy Levels: OK. ("..string.format(math.floor(reactor.getEnergyStored())).." RF)")
- else
- mon.setCursorPos(1,12)
- mon.setBackgroundColor(colors.orange)
- mon.setTextColor(colors.white)
- mon.write("Energy Levels: BAD, =REGENERATING=.")
- end
- mon.setCursorPos(1,13)
- mon.setBackgroundColor(colors.gray)
- mon.write(" ")
- mon.setCursorPos(1,13)
- mon.write("------------------------------------")
- mon.setCursorPos(1,14)
- mon.write(" ")
- mon.setCursorPos(1,14)
- mon.write("Error Status:")
- mon.setCursorPos(1,15)
- mon.write(" ")
- mon.setCursorPos(1,15)
- mon.write("------------------------------------")
- mon.setCursorPos(1,16)
- mon.setCursorPos(1,19)
- mon.setBackgroundColor(colors.green)
- mon.write("Xander is stupid")
- mon.setBackgroundColor(colors.gray)
- --Seperator Code, long and just for looks boi
- mon.setCursorPos(37, 1)
- mon.write(" ")
- mon.setCursorPos(38,2)
- mon.setCursorPos(37, 2)
- mon.write(" ")
- mon.setCursorPos(37, 3)
- mon.write(" ")
- mon.setCursorPos(38,3)
- mon.setCursorPos(37, 4)
- mon.write(" ")
- mon.setCursorPos(37, 5)
- mon.write(" ")
- mon.setCursorPos(37, 6)
- mon.write(" ")
- mon.setCursorPos(37, 7)
- mon.write(" ")
- mon.setCursorPos(37, 8)
- mon.write(" ")
- mon.setCursorPos(37, 9)
- mon.write(" ")
- mon.setCursorPos(37, 10)
- mon.write(" ")
- mon.setCursorPos(37, 11)
- mon.write(" ")
- mon.setCursorPos(37, 12)
- mon.write(" ")
- mon.setCursorPos(37, 13)
- mon.write(" ")
- mon.setCursorPos(37, 14)
- mon.write(" ")
- mon.setCursorPos(37, 15)
- mon.write(" ")
- mon.setCursorPos(37, 16)
- mon.write(" ")
- mon.setCursorPos(37, 17)
- mon.write(" ")
- mon.setCursorPos(37, 18)
- mon.write(" ")
- mon.setCursorPos(37, 19)
- mon.write(" ")
- mon.setCursorPos(37, 20)
- mon.write(" ")
- -- end of seperator
- mon.setBackgroundColor(colors.black)
- sleep(0.25)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement