Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This is the mainloop file, it checks the disk drives for a floppy with the clearance program on it.
- os.pullEvent = os.pullEventRaw
- local access = 2
- local h = fs.open("/securityVariables", "r")
- local access = tonumber(h.readLine())
- h.close()
- term.clear()
- term.setCursorPos(1,1)
- write("Current Access Level is set to: ")
- if access == 2 then
- print("STRICT")
- sleep(1)
- elseif access == 1 then
- print("MODERATE")
- sleep(1)
- elseif access == 0 then
- print("NONE")
- sleep(1)
- else
- print("Something weird with access variable")
- sleep(1)
- end
- print("Please put your access badge into the drive")
- sleep(1)
- local event, diskSide = os.pullEvent("disk")
- if event == "disk" then
- shell.run("cd /disk")
- shell.run("clearance")
- else
- --do nothing
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement