Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local copmponent = require("component")
- local term = require("term")
- local a = {}
- local i = 0
- local lowEnergy = 1
- local highEnergy = 90000000
- local critEnergy = 80000000
- a[1] = component.get("1e041384-fc3c-42f4-8bdf-a53739a3a4d4")
- a[2] = component.get("43997802-4b78-4d3b-825f-a9a89ecec343")
- a[3] = component.get("957dc433-bf68-4bdf-b838-1b6b12b2f687")
- a[4] = component.get("74af7b61-905a-4232-8faa-6fa7b730d313")
- a[5] = component.get("cab188aa-11f5-431c-a2ab-998056e95a83")
- function status(local i)
- if a[i].getActive() == true then
- x = true
- end
- if a[].getActive() == false then
- x = false
- end
- return x
- end
- local j = 1
- while j < 5 do
- a[j].setActive(true)
- j = j+1
- end
- while true do
- if a[i].getEnergyStored() < lowEnergy then
- a[i].setActive (true)
- end
- if a[i].getEnergyStored() == critEnergy then
- term.write("Reached Critical Energy!")
- end
- if a[i].getEnergyStored() > highEnergy then
- a[i].setActive (false)
- end
- print ("Reactor Status:" .. status() )
- print ("Reactor Energy:" .. a[i].getEnergyStored() )
- print ("Reactor Case Temp:" .. a[i].getCasingTemperature() )
- print ("Reactor Fuel Level:" .. a[i].getGuelAmount() )
- os.sleep(1)
- term.clear()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement