Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- reactor = peripheral.find("draconic_reactor")
- gate = peripheral.find("flux_gate")
- gate.setOverrideEnabled(true)
- function NotStop()
- reactor.stopReactor()
- end
- while true do
- info = reactor.getReactorInfo()
- term.clear()
- term.setCursorPos(1,1)
- print("-------------------------")
- print("Reaktor Sicherheitssystem")
- print("-------------------------")
- print()
- print("Reactor Status: ",info["status"])
- print()
- print()
- if info["status"] == "online" then
- print("-----------------------------")
- print("Sicherheitsueberwachung Aktiv")
- print("-----------------------------")
- print()
- print("Temperatur: ",info["temperature"])
- print("Feld Staerke: ",info["fieldStrength"])
- print("Energie Saettigung: ",info["energySaturation"])
- if (info["temperature"] > 8000) or (info["fieldStrength"] < 20000000) or (info["energySaturation"] < 120000000) then
- NotStop()
- end
- elseif info["status"] == "stopping" then
- print("----------------------------")
- print("Sicherheitsabschaltung Aktiv")
- print("----------------------------")
- print()
- drainRate = info["fieldDrainRate"]
- gate.setFlowOverride(drainRate * 1.2)
- print("Benoetigte Schildenergie: ",math.floor(drainRate * 1.2),"Rf/t")
- elseif info["status"] == "charging" then
- gate.setFlowOverride(500000)
- elseif info["status"] == "charged" then
- print("-------------------")
- print("Reaktor wird gladen")
- print("-------------------")
- gate.setFlowOverride(0)
- reactor.activateReactor()
- else
- gate.setFlowOverride(0)
- end
- os.sleep(0.2)
- end
- read()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement