Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mon = peripheral.wrap("monitor_0")
- local r1 = peripheral.wrap("BigReactors-Reactor_0")
- local timeout = os.startTimer(1)
- local im = paintutils.loadImage("bg")
- mon.clear()
- term.redirect(mon)
- paintutils.drawImage(im, 1, 1)
- while true do
- timeout = os.startTimer(1)
- mon.setCursorPos(1,1)
- mon.setTextColor(colors.blue)
- mon.write("CTRL Rods:")
- mon.setCursorPos(16,2)
- mon.setTextColor(colors.lightBlue)
- mon.write("+>")
- mon.setCursorPos(1,2)
- mon.write("Degrees C")
- mon.setCursorPos(1,3)
- mon.setTextColor(colors.blue)
- mon.write("Casing: ")
- mon.setTextColor(colors.white)
- mon.write(math.floor(r1.getCasingTemperature()))
- mon.setCursorPos(1,4)
- mon.setTextColor(colors.blue)
- mon.write("Fuel : ")
- mon.setTextColor(colors.white)
- mon.write(math.floor(r1.getFuelTemperature()))
- mon.setCursorPos(13,2)
- mon.setTextColor(colors.lightBlue)
- mon.write("<-")
- mon.setCursorPos(15,2)
- mon.setTextColor(colors.white)
- mon.write("%")
- mon.setCursorPos(14,1)
- mon.setTextColor(colors.white)
- mon.write(math.floor(r1.getControlRodLevel(0,100)))
- mon.setCursorPos(9,12)
- mon.setTextColor(colors.white)
- mon.write("ON")
- mon.setCursorPos(14,12)
- mon.setTextColour(colors.white)
- mon.write("OFF")
- event = {os.pullEvent()}
- if event[1] == "monitor_touch" then
- event,side,x,y = os.pullEvent()
- if x == 17 and y == 2 then
- r1.setAllControlRodLevels(r1.getControlRodLevel(0)+10)
- elseif x == 13 and y == 2 then
- r1.setAllControlRodLevels(r1.getControlRodLevel(0)-10)
- elseif event[1] == "timer" and event[2] == timeout then
- timeout = os.startTimer(1)
- elseif x >= 7 and x <= 11 and y >= 11 and y <= 12 then
- r1.setActive(true)
- elseif x >= 13 and x <=17 and y >= 11 and y <=12 then
- r1.setActive(false)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement