Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("DrawVal")
- os.loadAPI("PWrap")
- os.loadAPI("RWert")
- --os.loadAPI("MEnerg")
- P = PWrap.PWrap()
- W = RWert.RWert(P.R)
- shell.run("Intro")
- while true do
- P.mH.clear()
- P.mH.setTextScale(1,4)
- P.mH.setCursorPos(1,2)
- P.mH.setTextColor(colors.cyan)
- P.mH.write("ReaktorOS ProtoTyp")
- P.mH.setTextColor(colors.white)
- P.mH.setCursorPos(26,2)
- P.mH.write("O Shutdown Programm O")
- P.mH.setCursorPos(1,4)
- P.mH.write("1: Reaktor An")
- P.mH.setCursorPos(1,6)
- P.mH.write("2: Reaktor Aus")
- P.mH.setCursorPos(1,8)
- P.mH.write("3: aktuelle Kerntemperatur")
- P.mH.setCursorPos(1,10)
- P.mH.write("4: aktuelle Aussenwandtemperatur")
- P.mH.setCursorPos(1,12)
- P.mH.write("5: Brennzellenstatus")
- P.mH.setCursorPos(1,14)
- P.mH.write("6: Abfallmenge")
- P.mH.setCursorPos(1,16)
- P.mH.write("7: Kernzerfallsrate")
- P.mH.setCursorPos(1,18)
- P.mH.write("8: Brennzellenverbrauch")
- P.mT.clear()
- P.mT.setTextColor(colors.white)
- P.mT.setCursorPos(1,1)
- P.mT.setTextScale(1,0)
- MTimer = os.startTimer(1)
- event, side, x, y, MTimer = os.pullEvent()
- if event ~= "monitor_touch" then
- W = RWert.RWert()
- -- MTempR.MTempR(P.mT, W.tempF) --Temperatur Fuel
- MTempR.MTempR(P.mC, W.tempC) --Temperatur Case
- MReak.MReak(P.mR, W.radi, "Kernstrahlung", " % ", 2, 6, 12) --Radiation
- MReak.MReak(P.mF, W.waste, "Abfall", "milliBuckets", 2, 6, 12) --Waste
- MReak.MReak(P.mF, W.fuel, "Brennstoff", "milliBuckets", 2, 6, 12) --Fuel
- MReak.MReak(P.mFN, W.fuelN, "Verbrauch", "milliBuckets/T", 2, 6, 12) --FuelNeed
- --MEnerg.MEnerg()
- MTimer = os.startTimer(1)
- elseif event == "monitor_touch" then
- if x > 25 and x < 35 and y == 2 then
- shell.run("Shutdown")
- return
- elseif x > 0 and x < 24 and y == 4 then
- sleep(2)
- P.mH.clear()
- P.R.setActive(true)
- P.mH.setTextScale(1)
- P.mH.setCursorPos(1,1)
- P.mH.setTextColor(colors.green)
- P.mH.write("Reaktor wird Hochgefahren")
- sleep(2)
- else if x > 0 and x < 24 and y == 6 then
- P.mH.clear()
- P.R.setActive(false)
- P.mH.setTextScale(1)
- P.mH.setCursorPos(1,1)
- P.mH.setTextColor(colors.red)
- P.mH.write("Reaktor wird Heruntergefahren")
- sleep(2)
- else if x > 0 and x < 24 and y == 8 then
- DrawVal.DrawVal(P.mH, "Temperatur", W.tempF, "Grad C", colors.red, nil, colors.red)
- sleep(2)
- else if x > 0 and x < 24 and y == 10 then
- DrawVal.DrawVal(P.mH, "Temperatur", W.tempC, "Grad C", colors.red, nil, colors.red)
- sleep(2)
- else if x > 0 and x < 24 and y == 12 then
- DrawVal.DrawVal(P.mH, "Brennstoff", W.fuel, "mBuckets", colors.red, nil, colors.red)
- sleep(2)
- else if x > 0 and x < 24 and y == 14 then
- DrawVal.DrawVal(P.mH, "Abfallmenge", W.waste, "mBuckets", colors.yellow, nil, colors.yellow)
- sleep(2)
- else if x > 0 and x < 24 and y == 16 then
- DrawVal.DrawVal(P.mH, "Kernzerfallsrate", W.radi, "%", colors.purple, nil, colors.purple)
- sleep(2)
- else if x > 0 and x < 24 and y== 18 then
- DrawVal.DrawVal(P.mH, "Brennstoffverbrauch", W.fuelN, "mBuckets/T", colors.brown, nil, colors.brown)
- sleep(2)
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement