Marlingaming

States OS File Manager

Sep 2nd, 2021 (edited)
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. --this is the file manager, it allows players to Open, Edit, and Delete Allowed Files. the list of allowed Files will be in a seperate File
  2. Opened_File = "n"
  3. File_Permissions = "r"
  4. File_Path = "home"
  5. VisibleItems[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]
  6. ItemTypes[]
  7. start()
  8.  
  9. function start()
  10. BackgroundDraw()
  11. FolderDisplay()
  12. ScreenDrawer()
  13. UserManager()
  14. end
  15.  
  16. function BackgroundDraw()
  17. paintutils.drawFilledBox(0,0,51,19,color.blue)
  18. paintutils.drawFilledBox(3,2,49,17,color.gray)
  19. paintutils.drawBox(1,1,50,18,color.black)
  20. paintutils.drawFilledBox(4,2,47,4,color.white)
  21. end
  22.  
  23. function ScreenDrawer()--makes whatever is on the screen look way better.
  24. if Opened_File == "n" then
  25. paintutils.drawFilledBox(1,3,8,5,color.white)
  26. paintutils.drawFilledBox(10,3,13,5,color.white)
  27. paintutils.drawFilledBox(15,3,18,5,color.white)
  28. paintutils.drawFilledBox(20,3,23,5,color.white)
  29. paintutils.drawFilledBox(25,3,28,5,color.white)
  30. paintutils.drawFilledBox(1,7,8,9,color.white)
  31. paintutils.drawFilledBox(10,7,13,9,color.white)
  32. paintutils.drawFilledBox(15,7,18,9,color.white)
  33. paintutils.drawFilledBox(20,7,23,9,color.white)
  34. paintutils.drawFilledBox(25,7,28,9,color.white)
  35. else
  36. term.setCursorPos(4,4)
  37. term.clearLine()
  38. term.write(Opened_File)
  39. end
  40. end
  41.  
  42. function FileLookup(file) --allows the User to search for a specific File
  43. print("called File Look up")
  44. end
  45.  
  46. function FolderDisplay() --gathers all Items in a folder that the user is allowed to see.
  47. fs.list(File_Path)
  48. end
  49.  
  50. function FileOperator(action)--allows the player to open, close, edit, delete, and save a file
  51. print("called File Operator")
  52. end
  53.  
  54. function UserManager()-- Allows the Player to type, click files, and many other things
  55. print("Usermanager active")
  56. end
Add Comment
Please, Sign In to add comment