Ocawesome101

Main

Jul 9th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. -- The main script for OC-OS --
  2. -- Preliminary formalities --
  3. term.setBackgroundColor(colors.black)
  4. term.setTextColor(colors.white)
  5. term.clear()
  6. print('Welcome to OC-OS 0.01.')
  7. sleep(0.01)
  8.  
  9. -- The main script --
  10. version = os.version()
  11. print('System time is '..textutils.formatTime(os.time(),true))
  12. sleep(0.01)
  13. shell.setDir('/sys')
  14. os.loadAPI('/sys/log')
  15. os.loadAPI('/sys/updates')
  16. os.loadAPI('/sys/desktop')
  17. sleep(0.01)
  18. log.info('Loaded required APIs')
  19. if not version == 'CraftOS 1.8' then
  20.  sleep(0.01)
  21.  log.warn('Running on unsupported CraftOS version')
  22. end
  23. rednet.host('ocnp', 'OCPC')
  24. sleep(0.01)
  25. log.info('Set system hostname to OCPC using the OC Network Protocol')
  26. sleep(0.01)
  27. log.info('Loading desktop environment')
  28. desktop.init()
Add Comment
Please, Sign In to add comment