turtle gps rework
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
_G.requireInjector(_ENV)
|
||||
local Home = require('turtle.home')
|
||||
turtle.run(Home.go)
|
||||
local config = require('config').load('gps')
|
||||
if config.home then
|
||||
if turtle.enableGPS() then
|
||||
return turtle.pathfind(config.home)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
_G.requireInjector(_ENV)
|
||||
local Home = require('turtle.home')
|
||||
turtle.run(Home.set)
|
||||
local Config = require('config')
|
||||
local pt = turtle.enableGPS()
|
||||
if pt then
|
||||
local config = Config.load('gps', { })
|
||||
config.home = pt
|
||||
Config.update('gps', config)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user