Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function askForFunction()
- term.clear()
- term.setCursorPos(1,1)
- term.write("Funktion: ")
- term.setCursorPos(11,1)
- func = read()
- if func == "Reaktor" then
- rct = peripheral.find("nuclear_reactor")
- mon = peripheral.find("monitor")
- mon.setCursorPos(2,2)
- mon.write("Momentane Kernhitze: ")
- mon.setCursorPos(2,4)
- mon.write("Momentaner Output: ")
- --Button
- mon.setCursorPos(46,1)
- mon.setBackgroundColor(colors.red)
- mon.write(" X ")
- mon.setBackgroundColor(colors.black)
- while true do
- local event, side, xPos, yPos = os.pullEvent("monitor_touch")
- heat = rct.getHeat()
- EUout = rct.getEUOutput()
- mon.setCursorPos(23,2)
- mon.write(heat.." Celsius ")
- mon.setCursorPos(23,4)
- mon.write(EUout.." EU/t ")
- sleep(0.2)
- if event == "monitor_touch" and xPos > 46 and xPos < 49 and yPos == 1 then
- mon.clear()
- shell.run("restart")
- end
- end
- end
- end
- askForFunction()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement