KaiKikuchi

SafeReactor [Setup]

Jan 2nd, 2015
965
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.13 KB | None | 0 0
  1. ----------------------
  2. -- SafeReactor - a Big Reactors control program
  3. -- by Kai Kikuchi
  4. -- version: 0.23 - (BETA - STILL IN DEVELOP)
  5. --
  6. -- Source code: http://pastebin.com/7M3hziBV
  7. -- Sample screenshot: https://imgur.com/higRKAX
  8. -- OpenComputers WIP: http://pastebin.com/k40ktpxK
  9. --
  10. -- This program manages a Big Reactors reactor (both passive and active)
  11. -- and turbines, making it very fuel efficient
  12. --
  13. -- How to install on ComputerCraft:
  14. -- - type: pastebin run nPwUtAHc
  15. -- - press Enter
  16. ----------------------
  17.  
  18. term.clear()
  19. term.setCursorPos(1,1)
  20. print("SafeReactor - by Kai")
  21. print("This software is on develop and may contain bugs")
  22.  
  23. print("Press Enter to install this software...")
  24. local r=io.read()
  25.  
  26. print("Installing...")
  27.  
  28. fs.delete("/sr")
  29. shell.run("pastebin","get","7M3hziBV","/sr")
  30.  
  31. local startup=io.open("/startup", "w")
  32. startup:write("shell.run(\"/sr\")")
  33. startup:close()
  34.  
  35. if shell.getRunningProgram() == "disk/setup" then
  36.     print("Setup disk will be ejected...")
  37.     sleep(1)
  38.    
  39.     disk.eject(fs.getDrive(shell.getRunningProgram()))
  40. end
  41.  
  42. print()
  43. print("Rebooting...")
  44. print()
  45. sleep(1)
  46. shell.run("reboot")
Advertisement
Add Comment
Please, Sign In to add comment