Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --------------------------------------------------------------------------------------------
- term.clear()
- term.setCursorPos(1,1)
- --------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------
- local m = peripheral.find("monitor") -- Monitor for Management (5 long 3 wide)
- local r = peripheral.find("BigReactors-Reactor") -- Big Reactors, Reactor
- if m then
- print("Monitor Connected!")
- print("")
- else
- print("No Monitor Connected!")
- print("")
- end
- if r then
- print("Reactor Connected!")
- print("")
- else
- print("No Reactor Connected!")
- print("")
- end
- --------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------
- os.setComputerLabel("Noob's Reactor ControllerMonitor")
- --------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------
- r.setActive(true)
- if m then
- m.setTextScale(1)
- m.clear()
- end
- term.clear()
- --------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------
- term.setCursorPos(1,1)
- term.setTextColor(colors.lime)
- print("===================================================")
- print("| Big Reactor Monitor 2 [By: Noobular] |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("===================================================")
- --------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------
- ExtraNumber = 1
- i=1
- ypos = 1
- --------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------
- if m then
- while ypos ~= 20 do
- m.setTextColor(colors.cyan)
- -- Y POSITION
- m.setCursorPos(1,ypos)
- m.write("|")
- m.setCursorPos(50,ypos)
- m.write("|")
- m.setCursorPos(27,ypos)
- m.write("|")
- ypos = ypos +1
- end
- end
- --------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------
- if m then
- while i ~= 51 do
- -- X POSITION
- m.setCursorPos(i,2)
- m.write("-")
- m.setCursorPos(i,19)
- m.write("-")
- i = i + 1
- end
- end
- --------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------
- function Title()
- if m then
- m.setCursorPos(7,1)
- m.setTextColor(colors.cyan)
- m.write("Big Reactor Monitor 2 [By: Noobular]")
- m.setTextColor(colors.white)
- end
- end
- --------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------
- function Bar(text,func,y)
- if m then
- m.setCursorPos(3,y+ExtraNumber)
- m.setTextColor(colors.white)
- m.write(text)
- m.setTextColor(colors.lime)
- m.write(func)
- end
- end
- --------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------
- function Bar2(text,func,y)
- if m then
- m.setCursorPos(29,y+ ExtraNumber)
- m.setTextColor(colors.white)
- m.write(text)
- m.setTextColor(colors.lime)
- m.write(func)
- end
- end
- --------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------
- function Bar3(text,func,y)
- if m then
- m.setCursorPos(3,y+ExtraNumber)
- m.setTextColor(colors.white)
- m.write(text)
- m.setTextColor(colors.lime)
- m.write(func)
- m.write(" / ")
- m.write(r.getFuelAmountMax())
- end
- end
- function TBar(text,func,y)
- term.setCursorPos(3,y+ExtraNumber)
- term.setTextColor(colors.white)
- term.write(text)
- term.setTextColor(colors.lime)
- term.write(func)
- end
- function TBar2(text,func,y)
- term.setCursorPos(29,y+ ExtraNumber)
- term.setTextColor(colors.white)
- term.write(text)
- term.setTextColor(colors.lime)
- term.write(func)
- end
- function TerminalExtension()
- term.setCursorPos(23,4+ExtraNumber)
- term.write("k ")
- term.setCursorPos(49,2+ExtraNumber)
- term.write("%")
- term.setCursorPos(45,6+ExtraNumber)
- term.write(" C")
- term.setCursorPos(43,8+ExtraNumber)
- term.write(" C")
- term.setCursorPos(42,12+ExtraNumber)
- term.write("%")
- end
- function MonitorExtension()
- if m then
- m.setCursorPos(23,4+ExtraNumber)
- m.write("k ")
- m.setCursorPos(22,8+ExtraNumber)
- m.write(" ")
- m.setTextColor(colors.cyan)
- m.write("| ")
- m.setTextColor(colors.white)
- m.setCursorPos(22,10+ExtraNumber)
- m.write(" ")
- m.setTextColor(colors.cyan)
- m.write("| ")
- m.setTextColor(colors.white)
- m.setCursorPos(49,2+ExtraNumber)
- m.write("%")
- m.setTextColor(colors.cyan)
- m.write("|")
- m.setTextColor(colors.white)
- end
- end
- --------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------
- while true do
- EStored = math.floor(r.getEnergyStored()/1000)
- Rodl = 15
- if r.getActive() then
- ActiveValue = "true"
- else
- ActiveValue = "false"
- end
- Title()
- Bar("Currently Active: ",ActiveValue,2)
- Bar("Energy Stored: ",EStored,4)
- Bar("Fuel: ",r.getFuelAmount().." / "..r.getFuelAmountMax(),6)
- Bar("Fuel Used/S: ",r.getFuelConsumedLastTick() * 20,8)
- Bar("Fuel Used/T: ",r.getFuelConsumedLastTick(),10)
- Bar("RF/S: ", math.floor(r.getEnergyProducedLastTick() * 20),12)
- Bar("RF/T: ", math.floor(r.getEnergyProducedLastTick()),14)
- Bar("Waste: ",r.getWasteAmount(),16)
- Bar2("Yellorium Rods: ",r.getNumberOfControlRods(),4)
- Bar2("Fuel Reactivity: ", r.getFuelReactivity(),2)
- Bar2("Casing Temp: ", math.floor(r.getCasingTemperature()),6)
- Bar2("Fuel Temp: ", math.floor(r.getFuelTemperature()),8)
- Bar2("Cooled: ",r.isActivelyCooled(),10)
- Bar2("Rod Levels: ",r.getControlRodLevel(0),12)
- TBar("Currently Active: ",ActiveValue,2)
- TBar("Energy Stored: ",EStored,4)
- TBar("Fuel: ",r.getFuelAmount().." / "..r.getFuelAmountMax(),6)
- TBar("Fuel Used/S: ",r.getFuelConsumedLastTick() * 20,8)
- TBar("Fuel Used/T: ",r.getFuelConsumedLastTick(),10)
- TBar("RF/S: ", math.floor(r.getEnergyProducedLastTick() * 20),12)
- TBar("RF/T: ", math.floor(r.getEnergyProducedLastTick()),14)
- TBar("Waste: ",r.getWasteAmount(),16)
- TBar2("Fuel Reactivity: ", math.ceil(r.getFuelReactivity()),2)
- TBar2("Yellorium Rods: ",r.getNumberOfControlRods(),4)
- TBar2("Casing Temp: ", math.floor(r.getCasingTemperature()),6)
- TBar2("Fuel Temp: ", math.floor(r.getFuelTemperature()),8)
- TBar2("Cooled: ",r.isActivelyCooled(),10)
- TBar2("Rod Usage: ",math.floor(r.getEnergyStored()/100000),12)
- TerminalExtension()
- MonitorExtension()
- sleep(.1)
- --------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------
- if r.getEnergyStored()<=10000000 and r.getEnergyStored()>100 then
- r.setAllControlRodLevels(0+(math.floor(r.getEnergyStored()/100000)))
- else
- r.setAllControlRodLevels(0)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement