ThugDio

main.lua

May 3rd, 2022 (edited)
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. local digTunnel = require("digTunnel")
  2. local digSquare = require("digSquare")
  3. local dioAPI = require("dioAPI")
  4.  
  5. local MainInput = "start"
  6.  
  7. while (mainInput ~= "exit") do
  8. if (mainInput == "start") then
  9. --ToDo
  10. end
  11.  
  12. print("Olá, bóra?")
  13. mainInput = read()
  14.  
  15. if (mainInput == "help") then
  16. print("Eis as opções atualmente implementadas")
  17. print("digTunnel -> Inicia a função de cavar")
  18. print("dioAPI -> Funções básicas de mobilidade")
  19. elseif (mainInput == "digTunnel") then
  20. digTunnel.digIt()
  21. elseif (mainInput == "digSquare") then
  22. digSquare.digSquare()
  23. -- THIS SHITSHOW HAS TO BE DONE ANYWHERE ELSE
  24. elseif (mainInput == "dioAPI") then
  25. local funcINput = "start"
  26. while (funcInput ~= "exit") do
  27. term.clear()
  28. term.setCursorPos(1,1)
  29. print("Qual função?")
  30. funcInput = read()
  31. if (funcInput == "gu") then
  32. print("Quantidade?")
  33. local qtd = tonumber(read())
  34. dioAPI.gu(qtd)
  35. elseif (funcINput == "gd") then
  36. print("Quantidade?")
  37. local qtd = tonumber(read())
  38. dioAPI.gd(qtd)
  39. elseif (funcInput == "ta") then
  40. dioAPI.ta()
  41. elseif (funcInput == "tl") then
  42. dioAPI.tl()
  43. elseif (funcInput == "tr") then
  44. dioAPI.tr()
  45. elseif (funcInput == "refuel") then
  46. print("Quantidade?")
  47. local qtd = tonumber(read())
  48. dioAPI.refuel(qtd)
  49. elseif (funcInput == "power") then
  50. dioAPI.power()
  51. elseif (funcInput == "w") then
  52. print("Quantidade?")
  53. local qtd = tonumber(read())
  54. dioAPI.w(qtd)
  55. elseif (funcInput == "a") then
  56. dioAPI.tl()
  57. elseif (funcInput == "s") then
  58. dioAPI.tr()
  59. elseif (funcINput == "d") then
  60. dioAPI.ta()
  61. end
  62. end
  63. end
  64. end
Add Comment
Please, Sign In to add comment