Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Simple Big Reactor Monitor(monitor) by Disappearer
- -- This program need a wireless modem,advanced computer
- -- and at least 4 monitors to view informations normally.
- -- If you have different setup than one shown on screens
- -- edit these three variables below.
- rednet.open("right") -- side of wireless modem
- local mon = peripheral.wrap("top") -- side or name of monitor
- local protocol = "reactor1" -- protocol of computer sending informations
- while true do
- local id, mes, pro = rednet.receive(protocol)
- term.clear()
- term.redirect(mon)
- term.setCursorPos(1,1)
- mon.setTextScale(0.5)
- if mes == "false" then
- write("STATUS: ")
- mon.setBackgroundColour(colors.red)
- write("ERROR")
- mon.setBackgroundColour(colors.black)
- print()
- print()
- print("Something is wrong with program or reactor setup")
- print("Press Ctrl+T to terminate program")
- else
- write("STATUS: ")
- if mes.active == true then
- mon.setBackgroundColour(colors.lime)
- write("ACTIVE")
- elseif mes.active == false then
- mon.setBackgroundColour(colors.yellow)
- write("NOT ACTIVE")
- end
- mon.setBackgroundColour(colors.black)
- print()
- print()
- print("Energy Production: " .. math.floor(mes.energylasttick,0) .. " RF/t")
- print("Energy Stored: " .. mes.energystored .. " RF")
- print()
- print("Fuel: " .. mes.fuelamount .. "/" .. mes.fuelmax .. " mB")
- print("Fuel Usage: " .. math.ceil(mes.fueleatlasttick*100)/100 .. " mB/t")
- print("Fuel Temperature: " .. math.floor(mes.fueltemp,1) .. " C")
- print("Fuel Reactivity: " .. math.floor(mes.fuelreact,1) .. " %")
- print("Waste: " .. mes.wasteamount .. " mB")
- print()
- print("Casing Temperature:" .. math.floor(mes.casingtemp,1) .. " C")
- end
- sleep(0.11)
- end
Advertisement
Add Comment
Please, Sign In to add comment