turtle gps rework
This commit is contained in:
@@ -99,4 +99,12 @@ Needs work
|
||||
\030 \031f\030f\031e\139\030e\128\030f\159\129\0314\130\131\131\129",
|
||||
run = "recorder.lua",
|
||||
},
|
||||
[ "4486006f811b88cacd5f211fd579717e29b600cd" ] = {
|
||||
title = "Swarm",
|
||||
category = "Turtle",
|
||||
icon = " \0315\\\030 \031 \
|
||||
\0304\031f _ \030 \031c/\0315\\\
|
||||
\0304 ",
|
||||
run = "multiMiner.lua",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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