Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mouseWidth = 0
- local mouseHeight = 0
- local m = peripheral.find("monitor")
- local react = peripheral.find("BigReactors-Reactor")
- local turb = peripheral.find("BigReactors-Turbine")
- local pasteData = "9w0B6Rcz"
- local prgName = "turbineaus"
- shell.run("pastebin get "..pasteData.." "..prgName)
- shell.run("clear")
- w,h=m.getSize()
- Status1=1
- m.clear()
- function Status()
- steam = turb.getFluidFlowRate()
- speed = turb.getRotorSpeed()
- speed2 = math.ceil(speed, 0.1)
- energy = turb.getEnergyProducedLastTick()
- energy2 = math.ceil(energy, 0.1)
- estored = turb.getEnergyStored()/100
- fuelconsum = react.getFuelConsumedLastTick()
- fuelconsum2 = math.ceil(fuelconsum, 0.1)
- fuel = react.getFuelAmount()
- m.setTextColour(colors.white)
- m.clear()
- m.setCursorPos(1,1)
- m.write("Dampf/t: ")
- m.write(steam)
- m.setCursorPos(1,2)
- m.write("Rotor : ")
- m.write(speed2)
- m.setCursorPos(1,3)
- m.write("RF/T : ")
- m.write(energy2)
- m.setCursorPos(1,4)
- m.write("KRF : ")
- m.write(estored)
- m.setCursorPos(1,5)
- m.write("MB/t : ")
- m.write(fuelconsum2)
- m.setCursorPos(1,6)
- m.write("Yellorium: ")
- m.write(fuel)
- m.setCursorPos(21,1)
- m.setTextScale(1.5)
- m.setTextColour(colors.white)
- m.write("Status:")
- m.setCursorPos(21,2)
- m.setTextColour(colors.red)
- m.write("Aus")
- m.setCursorPos(21,3)
- m.setTextColour(colors.white)
- m.setBackgroundColour((colours.lime))
- m.setCursorPos(21,3)
- m.write(" An ")
- m.setCursorPos(21,5)
- m.write(" Aus ")
- m.setBackgroundColour((colours.black))
- end
- function cCP() --cCP = checkClickPosition
- if mouseWidth > 21 and mouseWidth < 25 and mouseHeight == 3 then
- react.setActive(true)
- turb.setActive(true)
- shell.run("turbineaus")
- elseif mouseWidth > 21 and mouseWidth < 25 and mouseHeight == 5 then
- react.setActive(false)
- turb.setActive(false)
- end
- 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(cCP,touch,Status)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement