Jameelo

Turtle Startup Sequence

Mar 7th, 2024 (edited)
1,078
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | Gaming | 0 0
  1. --[[
  2.     Code automatically excecuted on turtle startup
  3. ]]
  4.  
  5. -- should check to see if all required common libraries are installed
  6.  
  7. LIBRARIES = {
  8.     ["common/systemLib.lua"] = "q4vfvQPk",
  9.     ["common/storageLib.lua"] = "SzD8A2sq",
  10.     ["common/mineLib.lua"] = "N0mkQCxV",
  11. }
  12.  
  13. for lib, pbID in pairs(LIBRARIES) do
  14.     if fs.exists(lib) == false then
  15.         print("Reacquiring library: %s", lib)
  16.         shell.run(string.format("pastebin get %s %s", pbID, lib)) -- run full package installer
  17.     end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment