1
0
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:
kepler155c@gmail.com
2017-09-12 23:04:44 -04:00
parent e50e6da700
commit 9aca96cc3e
21 changed files with 3652 additions and 1190 deletions

View File

@@ -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