Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mouseWidth = 0
- local mouseHeight = 0
- reactor = peripheral.find("BigReactors-Reactor")
- m = peripheral.wrap("right")
- --reactor.setActive(false)
- redstone.setOutput("left", false)
- m.clear()
- m.setTextColour(colors.blue)
- m.setTextScale(1)
- m.setCursorPos(7,1)
- m.write("Reaktor-Programm")
- m.setTextColour(colors.white)
- m.setCursorPos(1,3)
- energy = reactor.getEnergyProducedLastTick()
- energy2 = math.ceil(energy, 0.1)
- estored = reactor.getEnergyStored()/100
- fuelconsum = reactor.getFuelConsumedLastTick()
- fuelconsum2 = math.ceil(fuelconsum, 0.1)
- fuel = reactor.getFuelAmount()
- waste = reactor.getWasteAmount()
- m.write("RF/T : ")
- if energy2 == 0 then
- m.setTextColour(colors.red)
- else
- m.setTextColour(colors.green)
- end
- m.write(energy2)
- m.setCursorPos(1,4)
- m.setTextColour(colors.white)
- m.write("KRF : ")
- if estored == 0 then
- m.setTextColour(colors.red)
- else
- m.setTextColour(colors.green)
- end
- m.write(estored)
- m.setCursorPos(1,5)
- m.setTextColour(colors.white)
- m.write("MB/t : ")
- if fuelconsum2 == 0 then
- m.setTextColour(colors.red)
- else
- m.setTextColour(colors.green)
- end
- m.write(fuelconsum2)
- m.setCursorPos(1,6)
- m.setTextColour(colors.white)
- m.write("Yellorium: ")
- if fuel == 0 then
- m.setTextColour(colors.red)
- else
- m.setTextColour(colors.green)
- end
- m.write(fuel)
- m.setTextColour(colors.white)
- m.setCursorPos(1,7)
- m.write("Waste : ")
- if waste >= 1000 then
- m.setTextColour(colors.red)
- else
- m.setTextColour(colors.green)
- end
- m.write(waste)
- m.setTextColour(colors.white)
- m.setTextScale(1)
- m.setCursorPos(1,8)
- m.setBackgroundColour((colours.lime))
- m.setCursorPos(20,3)
- m.write(" An ")
- m.setBackgroundColour((colors.red))
- m.setCursorPos(20,6)
- m.write(" Aus ")
- m.setBackgroundColour((colors.black))
- sleep(1)
- function cCP()
- event,p1,p2,p3 = os.pullEvent("monitor_touch")
- mouseWidth = p2
- mouseHeight = p3
- if mouseWidth > 20 and mouseWidth < 26 and mouseHeight == 3 then
- reactor.setActive(true)
- redstone.setOutput("left", true)
- shell.run("Reactor")
- elseif mouseWidth > 20 and mouseWidth < 26 and mouseHeight == 6 then
- reactor.setActive(false)
- redstone.setOutput("left", false)
- shell.run("reboot")
- end
- end
- function wirelessStart()
- local senderId, message, protocol = rednet.receive()
- if message == "start" then
- reactor.setActive(true)
- redstone.setOutput("left", true)
- shell.run("Reactor")
- elseif message == "stop" then
- reactor.setActive(false)
- redstone.setOutput("left", false)
- shell.run("reboot")
- end
- function touch()
- repeat
- event,p1,p2,p3 = os.pullEvent("monitor_touch")
- if event=="monitor_touch" then
- mouseWidth = p2
- mouseHeight = p3
- cCP()
- end
- until event=="char" and p1==("x")
- end
- parallel.waitForAll(wirelessStart, cCP, touch)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement