reorganization

This commit is contained in:
kepler155c
2017-09-15 02:31:11 -04:00
parent c2491f53a8
commit d45b375678
17 changed files with 3350 additions and 0 deletions

29
etc/scripts/moveTo Normal file
View File

@@ -0,0 +1,29 @@
turtle.run(function()
requireInjector(getfenv(1))
local GPS = require('gps')
local Socket = require('socket')
local id = {COMPUTER_ID}
if not turtle.enableGPS() then
error('turtle: No GPS found')
end
local socket = Socket.connect(id, 161)
if not socket then
error('turtle: Unable to connect to ' .. id)
end
socket:write({ type = 'gps' })
local pt = socket:read(3)
if not pt then
error('turtle: No GPS response')
end
if not turtle.pathfind(pt) then
error('Unable to go to location')
end
end)