Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- r1 = peripheral.wrap("BigReactors-Reactor_1")
- r2 = peripheral.wrap("BigReactors-Reactor_2")
- args = {...}
- if args[1] == "r1" then
- if args[2] == "status" then
- if args[3] == "on" then
- r1.setActive(true)
- return
- elseif args[3] == "off" then
- r1.setActive(false)
- else
- if r1.getActive() == true then
- print("Reactor is on")
- else
- print("Reactor is off")
- end
- print "Usage: reaktor status [on,off]"
- end
- elseif args[2] == "produces" then
- print(r1.getEnergyProducedLastTick().." RF/T")
- elseif args[2] == "temp" then
- if args[3] == "case" then
- print(r1.getCasingTemperature().." C")
- elseif args[3] == "core" then
- print(r1.getFuelTemperature().. " C")
- else
- print("Usage: reaktor temp [case,core]")
- end
- elseif args[2] == "amount" then
- if args[3] == "fuel" then
- print(r1.getFuelAmount().. " mB FROM "..reaktor.getFuelAmountMax().." mB")
- elseif args[3] == "waste" then
- print(r1.getWasteAmount().. " mB")
- else
- print("Usage: reaktor amount [fuel,waste]")
- end
- elseif args[1] == "r2" then
- if args[2] == "status" then
- if args[3] == "on" then
- r2.setActive(true)
- return
- elseif args[3] == "off" then
- r2.setActive(false)
- else
- if r2.getActive() == true then
- print("Reactor is on")
- else
- print("Reactor is off")
- end
- print "Usage: reaktor status [on,off]"
- end
- elseif args[2] == "produces" then
- print(r2.getEnergyProducedLastTick().." RF/T")
- elseif args[2] == "temp" then
- if args[3] == "case" then
- print(r2.getCasingTemperature().." C")
- elseif args[3] == "core" then
- print(r2.getFuelTemperature().. " C")
- else
- print("Usage: reaktor temp [case,core]")
- end
- elseif args[2] == "amount" then
- if args[3] == "fuel" then
- print(r2.getFuelAmount().. " mB FROM "..reaktor.getFuelAmountMax().." mB")
- elseif args[3] == "waste" then
- print(r2.getWasteAmount().. " mB")
- else
- print("Usage: reaktor amount [fuel,waste]")
- end
- else
- print "Usage: reaktor [status,produces,temp, amount]"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement