Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local reactor1 = peripheral.wrap("BigReactors-Reactor_1")
- local mon = peripheral.wrap("back")
- mon.clear()
- --Color reset
- mon.setBackgroundColor(colors.black)
- mon.setTextColor(colors.white)
- mon.setTextScale(1)
- --Peripheral check
- if(reactor1==nil)then
- mon.setCursorPos(1,1)
- mon.setTextColor(colors.red)
- mon.write("Reactor is missing")
- mon.setCursorPos(1,2)
- if(peripheral.getType("bottom")=="modem") then
- mon.setTextColor(colors.lime)
- mon.write("Modem connected")
- else
- mon.write("Modem not connected")
- end
- mon.setTextColor(colors.white)
- mon.setBackgroundColor(colors.black)
- mon.setTextScale(1)
- return
- end
- --Active status
- mon.setCursorPos(1,1)
- mon.setTextColor(colors.white)
- mon.write("Active: ")
- mon.setTextColor(colors.lime)
- mon.write(reactor1.getActive())
- --RF Redstoneflux per tick
- mon.setCursorPos(1,2)
- mon.setTextColor(colors.white)
- mon.write("RF/T: ")
- mon.setTextColor(colors.lime)
- mon.write(math.floor(reactor1.getEnergyProducedLastTick()))
- --Control rod amount
- mon.setCursorPos(1,3)
- mon.setTextColor(colors.white)
- mon.write("Control Rods: ")
- mon.setTextColor(colors.lime)
- mon.write(math.floor(reactor1.getNumberOfControlRods()))
- --RedStoneflux amount stored
- mon.setCursorPos(1,4)
- mon.setTextColor(colors.white)
- mon.write("RF Stored: ")
- mon.setTextColor(colors.lime)
- mon.write(math.floor(reactor1.getEnergyStored()))
- --Casing Temprature
- mon.setCursorPos(1,5)
- mon.setTextColor(colors.white)
- mon.write("Casing Heat: ")
- mon.setTextColor(colors.lime)
- mon.write(math.floor(reactor1.getCasingTemperature()))
- --Fuel Temprature
- mon.setCursorPos(1,6)
- mon.setTextColor(colors.white)
- mon.write("Fuel Heat: ")
- mon.setTextColor(colors.lime)
- mon.write(math.floor(reactor1.getFuelTemperature()))
- --Paint buttons
- mon.setTextColor(colors.black)
- mon.setBackgroundColor(colors.lime)
- mon.setCursorPos(1,10)
- mon.clearLine()
- mon.setCursorPos(4,11)
- mon.clearLine()
- mon.write("ON")
- mon.setCursorPos(1,12)
- mon.clearLine()
- mon.setBackgroundColor(colors.red)
- mon.setCursorPos(10,10)
- mon.write(" ")
- mon.setCursorPos(10,11)
- mon.write(" OFF ")
- mon.setCursorPos(10,12)
- mon.write(" ")
- --Background rest
- mon.setBackgroundColor(colors.black)
- --Timer and touch eventlistener
- os.startTimer(1)
- event,side,x,y = os.pullEvent()
- if event == "monitor_touch" and y>=10 then
- if x <= 10 then
- reactor1.setActive(true)
- elseif x >10 then
- reactor1.setActive(false)
- -- End Reactor 1
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement