Advertisement
ksaw000

base

Feb 3rd, 2021 (edited)
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. --[[this file is responsible for getting the corresponding files through pastebin using pastebin get <code> <name>.
  2. This makes updating mulitple files considerably easier]]
  3. shell.run("delete programs/") --remove old files
  4. shell.run("mkdir programs")
  5. shell.run("pastebin get JjRjXtFx programs/globalVars")
  6. shell.run("pastebin get Kr8ZnHsP programs/checkFuel")
  7. shell.run("pastebin get JHfcc6z0 programs/getOrientation")
  8. shell.run("pastebin get kyPga1Ft programs/moveTo")
  9. shell.run("pastebin get UmEW50gL programs/invDump")
  10.  
  11. require("programs/globalVars")
  12.  
  13. rednet.open("right") -- open the wireless modem for communication
  14. while true do -- puts turtle into a waitloop for a message
  15. HEADING = shell.run("programs/getOrientation")
  16. local id,message = rednet.receive()
  17. command = {}
  18. for word in message:gmatch("%w+") do table.insert(command, word) end
  19. if command[1]=="exit" then
  20. break
  21. elseif command[1] =="dump" then
  22. shell.run("programs/invDump ".. tostring(FIRST_FREE_SLOT))
  23. elseif command[1]=="checkFuel" then
  24. shell.run("programs/checkFuel")
  25. elseif command[1]=="moveTo" then
  26. shell.run("programs/"..message)
  27. end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement