Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This is the master file, open this to start
- -- chockos.
- -- System Variables:
- id = os.getComputerID()
- -- :System Variables
- -- APIs
- os.loadAPI("chockos/clickapi")
- os.loadAPI("chockos/fileapi")
- os.loadAPI("chockos/accountapi")
- os.loadAPI("chockos/config")
- os.loadAPI("chockos/pages/home")
- os.loadAPI("chockos/shutdown")
- os.loadAPI("chockos/commandapi")
- os.loadAPI("chockos/pages/signin")
- os.loadAPI("chockos/pages/create")
- os.loadAPI("chockos/typeapi")
- os.loadAPI("chockos/pages/menu")
- systemVersion = config.systemVersion()
- -- APIs
- function startup()
- -- this is just the startup sequence
- sleep(1)
- term.setTextColour(colours.yellow)
- print("ChockOS v"..systemVersion)
- print("by ChoCo Ind. - Making cool useless stuff")
- sleep(2)
- term.setCursorPos(1,2)
- term.clear()
- sleep(1)
- print(fileapi.readFile("chockos/startupscreen.img"))
- sleep(2)
- term.clear()
- sleep(1)
- end
- -- comment out the next line to disable startup
- -- sequence:
- startup()
- --
- function homepage()
- term.clear()
- homeLoop = false
- while not homeLoop do homeLoop = home.main() end
- if fs.exists("chockos/temp") then fs.delete("chockos/temp") end
- if homeLoop == "signin" then
- result = signin.main()
- end
- if homeLoop == "create" then
- result = create.main()
- end
- if homeLoop == "shutdown" then
- result = shutdown.main()
- end
- return result
- end
- function Fhome()
- homeResult = homepage()
- while not homeResult do homeResult = homepage() end
- username, password = homeResult
- menuResult = menu.main(username,password)
- return menuResult
- end
- menuResult = 'logoff'
- while menuResult == 'logoff' do
- menuResult = Fhome()
- end
- if menuResult == 'filesys' then
- print("Hoooo boy")
- end
- print("end")
- sleep(2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement