farms - improvements

This commit is contained in:
kepler155c
2018-11-30 13:15:40 -05:00
parent e9d9025ea7
commit 53c11db773
3 changed files with 85 additions and 17 deletions

View File

@@ -23,10 +23,13 @@ _G.requireInjector()
local Point = require('point')
local Util = require('util')
local fs = _G.fs
local os = _G.os
local read = _G.read
local turtle = _G.turtle
local STARTUP_FILE = 'usr/autorun/treefarm.lua'
local FUEL_BASE = 0
local FUEL_DIRE = FUEL_BASE + 10
local FUEL_GOOD = FUEL_BASE + 2000
@@ -75,6 +78,12 @@ local state = Util.readTable('usr/config/treefarm') or {
}
}
if not fs.exists(STARTUP_FILE) then
Util.writeFile(STARTUP_FILE,
[[os.sleep(1)
shell.openForegroundTab('packages/farms/treefarm.lua')]])
end
local clock = os.clock()
local function inspect(fn)