CultistaDeCrocs

asshatPrograms

Sep 15th, 2024 (edited)
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1. require("libraries.asshat")
  2.  
  3. programas =
  4. {
  5.     {"asshatManual", "Important instructions for use"},
  6.     {"asshatPrograms", "Lists available programs"},
  7.     {"asshatStartup", "Manual for the startup program"},
  8.     {"updateFloppy", "Updates a floppy disk's programs"},
  9.     {"updateMachine", "Uses a floppy disk to update the machine"},
  10.     {"branchMine", "Branch mines"},
  11.     {"chopTree", "Cuts a tree in front of the robot"},
  12.     {"stairs", "Builds or digs stairs upwards or downwards"},
  13.     {"dig", "Digs a large area. Has 4 modes"},
  14.     {"bridge", "Builds a bridge until it finds ground or a wall"},
  15.     {"tower", "Builds either a tower or spiral staircase"},
  16. }
  17.  
  18.  
  19. term.clear()
  20. term.setCursorPos(1,1)
  21. local width, height = term.getSize()
  22.  
  23. for i=1, #programas do
  24.     local x, y = term.getCursorPos()
  25.    
  26.     writeCor(programas[i][1], colors.yellow)
  27.     print(": "..programas[i][2].."\n")
  28.    
  29.     if (y >= height-4) then
  30.         term.setCursorPos(1,height)
  31.         writeCentroCor("[Press ENTER to continue]", colors.orange)
  32.         os.pullEvent("key")
  33.         term.clear()
  34.         term.setCursorPos(1,1)
  35.     end
  36. end
Add Comment
Please, Sign In to add comment