Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local m = peripheral.find("monitor")
- local react = peripheral.find("BigReactors-Reactor")
- local turb = peripheral.find("BigReactors-Turbine")
- ReacTime1=1
- function Turbine2()
- repeat
- 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.green)
- m.write("[Turbine/")
- m.setCursorPos(21,4)
- m.write("Reaktor An]")
- sleep(1)
- until ReacTime1 == 99
- end
- a=1
- function aus2()
- if a == 1 then
- m.setTextColour(colors.white)
- event,side,x,y=os.pullEvent("monitor_touch")
- m.clear()
- m.setCursorPos(21,1)
- m.setTextScale(1)
- m.write("Status:")
- m.setCursorPos(21,2)
- m.setTextColour(colors.white)
- m.write("wird Hochgefahren")
- react.setActive(true)
- turb.setActive(true)
- end
- end
- parallel.waitForAny(Turbine2,aus2)
- time=1
- repeat
- time=time+1
- m.setTextScale(1.5)
- b = "."
- m.setCursorPos(1,1)
- m.write("Status:")
- m.setCursorPos(1,2)
- m.write("wird Hochgefahren")
- m.write(b)
- sleep(0.33)
- m.clear()
- m.setCursorPos(1,2)
- c = ".."
- m.setCursorPos(1,1)
- m.write("Status:")
- m.setCursorPos(1,2)
- m.write("wird Hochgefahren")
- m.write(c)
- sleep(0.33)
- m.clear()
- m.setCursorPos(1,1)
- m.write("Status:")
- m.setCursorPos(1,2)
- d = "..."
- m.write("wird Hochgefahren")
- m.write(d)
- sleep(0.33)
- m.clear()
- until time == 5
- local ReacTime=1
- function Turbine()
- repeat
- 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.setTextColour(colors.white)
- m.setCursorPos(21,1)
- m.write("Status:")
- m.setCursorPos(21,2)
- m.setTextColour(colors.green)
- m.write("An")
- m.setCursorPos(21,3)
- m.setTextColour(colors.red)
- m.write("[Turbine/")
- m.setCursorPos(21,4)
- m.write("Reaktor aus]")
- sleep(1)
- until ReacTime == 99
- end
- a=1
- function aus()
- if a == 1 then
- m.setTextColour(colors.white)
- event,side,x,y=os.pullEvent("monitor_touch")
- m.clear()
- m.setCursorPos(21,1)
- m.setTextScale(1)
- m.write("Status:")
- m.setCursorPos(21,2)
- m.setTextColour(colors.white)
- m.write("wird Heruntergefahren")
- react.setActive(false)
- turb.setActive(false)
- end
- end
- parallel.waitForAny(Turbine,aus)
- time=1
- m.setTextScale(1.5)
- repeat
- time=time+1
- b = "."
- m.setCursorPos(1,1)
- m.write("Status:")
- m.setCursorPos(1,2)
- m.write("wird Heruntergefahren")
- m.write(b)
- sleep(0.33)
- m.clear()
- m.setCursorPos(1,2)
- c = ".."
- m.setCursorPos(1,1)
- m.write("Status:")
- m.setCursorPos(1,2)
- m.write("wird Heruntergefahren")
- m.write(c)
- sleep(0.33)
- m.clear()
- m.setCursorPos(1,1)
- m.write("Status:")
- m.setCursorPos(1,2)
- d = "..."
- m.write("wird Heruntergefahren")
- m.write(d)
- sleep(0.33)
- m.clear()
- until time == 5
- shell.run("Reaktor")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement