diff options
| author | Andrew Lee <alee14498@gmail.com> | 2019-03-05 13:00:10 -0500 |
|---|---|---|
| committer | Andrew Lee <alee14498@gmail.com> | 2019-03-05 13:00:10 -0500 |
| commit | 35e41bc9a7aecb11895f87695fcc0142358ed2a0 (patch) | |
| tree | b712f0b66ede1f1226b8cdbb7442be3b0518b40c | |
| parent | 8e5d5935df078db9f05a9587ad6d61b7f2b82dcf (diff) | |
| download | bits-UI-35e41bc9a7aecb11895f87695fcc0142358ed2a0.tar.gz bits-UI-35e41bc9a7aecb11895f87695fcc0142358ed2a0.tar.bz2 bits-UI-35e41bc9a7aecb11895f87695fcc0142358ed2a0.zip | |
Fixed a bunch of problems
| -rw-r--r-- | startup | 20 | ||||
| -rw-r--r-- | system/boot.lua | 22 |
2 files changed, 21 insertions, 21 deletions
@@ -3,13 +3,13 @@ local boot = "/system/boot.lua" function bootloader() term.setCursorPos(1,1) - term.write("Welcome to the BUBL boot loader!\n") + print("Welcome to the BUBL boot loader!\n") term.setCursorPos(1,3) - term.write("1. Boot bits-UI\n") + print("1. Boot bits-UI\n") term.setCursorPos(1,4) - term.write("2. Update bits-UI\n") + print("2. Update bits-UI\n") term.setCursorPos(1,5) - term.write("3. Boot CraftOS\n") + print("3. Boot CraftOS\n") term.setCursorPos(1,7) term.write("> ") end @@ -28,15 +28,15 @@ function bootloaderInput() shell.run("/system/boot.lua") elseif input == "2" then clear() - term.write("Running updater...") + print("Running updater...") sleep(3) shell.run("pastebin", "run", "7XY80hfG") elseif input == "3" then clear() - term.write(os.version()) + print(os.version()) term.setCursorPos(1,2) else - term.write("[ERROR] Invalid number.") + print("[ERROR] Invalid number.") bootloader() bootloaderInput() end @@ -46,13 +46,13 @@ end if fs.exists(boot) then term.setTextColor(colors.green) - term.write("Boot detected!") + print("Boot detected!") else clear() term.setTextColor(colors.red) - term.write("[ERROR] System has been halted.") + print("[ERROR] System has been halted.") term.setCursorPos(1,2) - term.write("Details: Cannot find boot.lua") + print("Details: Cannot find boot.lua") sleep(3) os.shutdown() end diff --git a/system/boot.lua b/system/boot.lua index 4554d9e..6ba6a18 100644 --- a/system/boot.lua +++ b/system/boot.lua @@ -7,14 +7,14 @@ local desktop = "/system/desktop.lua" term.clear() term.setCursorPos(1,1) -term.write("Starting up bits-UI ".. version .."...") +print("Starting up bits-UI ".. version .."...") sleep(3) if term.isColor() then term.setTextColor(colors.green) - term.write("[OK] Advanced Computer is detected...") + print("[OK] Advanced Computer is detected...") else - term.write("[ERROR] You need a advanced computer in order to make the UI functional...") + print("[ERROR] You need a advanced computer in order to make the UI functional...") sleep(3) os.shutdown() end @@ -23,10 +23,10 @@ sleep(3) if fs.exists(desktop) then term.setTextColor(colors.green) - term.write("[OK] Desktop has been found...") + print("[OK] Desktop has been found...") else term.setTextColor(colors.red) - term.write("[ERROR] Desktop cannot be found...") + print("[ERROR] Desktop cannot be found...") sleep(3) os.shutdown() end @@ -35,29 +35,29 @@ sleep(3) if fs.exists("/home") then term.setTextColor(colors.green) - term.write("[OK] Home has been found...") + print("[OK] Home has been found...") else fs.makeDir("/home") term.setTextColor(colors.green) - term.write("[OK] Home directory has been created...") + print("[OK] Home directory has been created...") end sleep(3) if fs.exists("/system/bitUI.config") then term.setTextColor(colors.green) - term.write("[OK] Config has been found...") + print("[OK] Config has been found...") else config = io.open("/system/bitUI.config", "w") config:close() term.setTextColor(colors.blue) - term.write("[INFO] Config has not been found!") - term.write("[INFO] You will be sent to the OOBE setup...") + print("[INFO] Config has not been found!") + print("[INFO] You will be sent to the OOBE setup...") end sleep(3) term.setTextColor(colors.green) -term.write("[DONE] Boot sequence is completed...") +print("[DONE] Boot sequence is completed...") term.setTextColor(colors.white) sleep(3) shell.run(desktop)
\ No newline at end of file |
