Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.41 KB | None | 0 0
  1. r1 = peripheral.wrap("BigReactors-Reactor_1")
  2. r2 = peripheral.wrap("BigReactors-Reactor_2")
  3. args = {...}
  4. if args[1] == "r1" then
  5. if args[2] == "status" then
  6. if args[3] == "on" then
  7. r1.setActive(true)
  8. return
  9. elseif args[3] == "off" then
  10. r1.setActive(false)
  11. else
  12. if r1.getActive() == true then
  13. print("Reactor is on")
  14. else
  15. print("Reactor is off")
  16. end
  17. print "Usage: reaktor status [on,off]"
  18. end
  19. elseif args[2] == "produces" then
  20. print(r1.getEnergyProducedLastTick().." RF/T")
  21. elseif args[2] == "temp" then
  22. if args[3] == "case" then
  23. print(r1.getCasingTemperature().." C")
  24. elseif args[3] == "core" then
  25. print(r1.getFuelTemperature().. " C")
  26. else
  27. print("Usage: reaktor temp [case,core]")
  28. end
  29. elseif args[2] == "amount" then
  30. if args[3] == "fuel" then
  31. print(r1.getFuelAmount().. " mB FROM "..reaktor.getFuelAmountMax().." mB")
  32. elseif args[3] == "waste" then
  33. print(r1.getWasteAmount().. " mB")
  34. else
  35. print("Usage: reaktor amount [fuel,waste]")
  36. end
  37. elseif args[1] == "r2" then
  38. if args[2] == "status" then
  39. if args[3] == "on" then
  40. r2.setActive(true)
  41. return
  42. elseif args[3] == "off" then
  43. r2.setActive(false)
  44. else
  45. if r2.getActive() == true then
  46. print("Reactor is on")
  47. else
  48. print("Reactor is off")
  49. end
  50. print "Usage: reaktor status [on,off]"
  51. end
  52. elseif args[2] == "produces" then
  53. print(r2.getEnergyProducedLastTick().." RF/T")
  54. elseif args[2] == "temp" then
  55. if args[3] == "case" then
  56. print(r2.getCasingTemperature().." C")
  57. elseif args[3] == "core" then
  58. print(r2.getFuelTemperature().. " C")
  59. else
  60. print("Usage: reaktor temp [case,core]")
  61. end
  62. elseif args[2] == "amount" then
  63. if args[3] == "fuel" then
  64. print(r2.getFuelAmount().. " mB FROM "..reaktor.getFuelAmountMax().." mB")
  65. elseif args[3] == "waste" then
  66. print(r2.getWasteAmount().. " mB")
  67. else
  68. print("Usage: reaktor amount [fuel,waste]")
  69. end
  70. else
  71. print "Usage: reaktor [status,produces,temp, amount]"
  72. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement