Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local w,h = term.getSize()
- function printCentered(msg, height)
- term.setCursorPos(w/2 - #msg/2, height)
- term.write(msg)
- end
- function printWrappedRight(msg, height)
- term.setCursorPos(w - #msg, height)
- term.write(msg)
- end
- if not fs.exists("m-os/desktop") then
- term.setBackgroundColor(colors.red)
- term.clear()
- term.setBackgroundColor(colors.gray)
- term.setCursorPos(1,1)
- term.clearLine()
- term.setTextColor(colors.white)
- print("Could not find file.")
- term.setBackgroundColor(colors.red)
- term.setCursorPos(1,2)
- print("M-OS could not find the file: m-os/desktop")
- print("If you would like to reinstall M-OS when you reboot, type Y. If not, type n.")
- sleep(1000000)
- end
- if not fs.exists("m-os/images/bground") then
- term.setBackgroundColor(colors.red)
- term.clear()
- term.setBackgroundColor(colors.gray)
- term.setCursorPos(1,1)
- term.clearLine()
- term.setTextColor(colors.white)
- print("Could not find file.")
- term.setBackgroundColor(colors.red)
- term.setCursorPos(1,2)
- print("M-OS could not find the file: m-os/images/bground")
- print("If you would like to reinstall M-OS when you reboot, type Y. If not, type n.")
- sleep(1000000)
- end
- if not fs.exists("m-os/settings") then
- term.setBackgroundColor(colors.red)
- term.clear()
- term.setBackgroundColor(colors.gray)
- term.setCursorPos(1,1)
- term.clearLine()
- term.setTextColor(colors.white)
- print("Could not find file.")
- term.setBackgroundColor(colors.red)
- term.setCursorPos(1,2)
- print("M-OS could not find the file: m-os/settings")
- print("If you would like to reinstall M-OS when you reboot, type Y. If not, type n.")
- sleep(1000000)
- end
- if not fs.exists("m-os/programs/installed_programs") then
- term.setBackgroundColor(colors.red)
- term.clear()
- term.setBackgroundColor(colors.gray)
- term.setCursorPos(1,1)
- term.clearLine()
- term.setTextColor(colors.white)
- print("Could not find file.")
- term.setBackgroundColor(colors.red)
- term.setCursorPos(1,2)
- print("M-OS could not find the file: m-os/programs.installed_programs")
- print("If you would like to reinstall M-OS when you reboot, type Y. If not, type n.")
- sleep(1000000)
- end
- term.setBackgroundColor(colors.lightGray)
- term.clear()
- local logo = paintutils.loadImage("m-os/images/logo")
- paintutils.drawImage(logo,w/2-6,h/2-4)
- term.setBackgroundColor(colors.lightGray)
- printCentered("Loading..",h/2+5)
- term.setBackgroundColor(colors.white)
- term.setCursorPos(w / 2 - 19 / 2,h/2+3)
- textutils.slowWrite(" ",25)
- term.clear()
- sleep(0.2)
- shell.run("m-os/logon")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement