Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- m = peripheral.wrap("right")
- m.clear()
- function fillTable()
- button.setTable("Reactor", test1, 4,14,3,5)
- button.setTable("Fertilizer", test2, 16,26,3,5)
- button.setTable("Coke Oven", test3, 4,14,8,10)
- button.setTable("Test4", test4, 16,26,8,10)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function test1()
- button.toggleButton("Reactor")
- if rs.testBundledInput("back", colors.yellow) then
- rs.setBundledOutput("back", 0)
- else
- rs.setBundledOutput("back", colors.yellow)
- end
- end
- rs.setBundledOutput("back", colors.blue)
- function test2()
- button.toggleButton("Fertilizer")
- if rs.testBundledInput("back", 0) then
- rs.setBundledOutput("back", colors.blue)
- else
- rs.setBundledOutput("back", 0)
- end
- end
- function test3()
- button.toggleButton("Coke Oven")
- if rs.testBundledInput("back", colors.red) then
- rs.setBundledOutput("back", 0)
- else
- rs.setBundledOutput("back", colors.red)
- end
- end
- function test4()
- print("Test4")
- end
- fillTable()
- button.heading("Control Panel")
- while true do
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement