mirror of
https://github.com/kepler155c/opus
synced 2025-10-22 11:17:40 +00:00
treefarm + turtle improvements + cleanup
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
if turtle and device.wireless_modem then
|
||||
|
||||
local s, m = turtle.run(function()
|
||||
local homePt = turtle.loadLocation('gpsHome')
|
||||
|
||||
if homePt then
|
||||
requireInjector(getfenv(1))
|
||||
|
||||
requireInjector(getfenv(1))
|
||||
local Config = require('config')
|
||||
local config = {
|
||||
destructive = false,
|
||||
}
|
||||
Config.load('gps', config)
|
||||
|
||||
local Config = require('config')
|
||||
local config = {
|
||||
destructive = false,
|
||||
}
|
||||
Config.load('gps', config)
|
||||
if config.home then
|
||||
|
||||
local s = turtle.enableGPS(2)
|
||||
if not s then
|
||||
@@ -30,7 +29,7 @@ if turtle and device.wireless_modem then
|
||||
turtle.setPolicy('turtleSafe')
|
||||
end
|
||||
|
||||
if not turtle.pathfind(homePt) then
|
||||
if not turtle.pathfind(config.home) then
|
||||
error('Failed to return home')
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user