autoruns
This commit is contained in:
@@ -46,7 +46,8 @@ end
|
||||
if not fs.exists(STARTUP_FILE) then
|
||||
Util.writeFile(STARTUP_FILE,
|
||||
[[os.sleep(1)
|
||||
shell.openForegroundTab('packages/farms/farmer.lua')]])
|
||||
shell.openForegroundTab('farmer.lua')]])
|
||||
print('Autorun program created: ' .. STARTUP_FILE)
|
||||
end
|
||||
|
||||
local retain = Util.transpose {
|
||||
|
||||
@@ -68,11 +68,12 @@ local c = Peripheral.lookup('type/minecraft:chest') or error('Missing chest')
|
||||
local directions = { top = 'down', bottom = 'up' }
|
||||
local direction = directions[c.side] or getLocalName()
|
||||
local chest = Adapter({ side = c.side, direction = direction }) or error('missing chest')
|
||||
_G._p = chest
|
||||
|
||||
if not fs.exists(STARTUP_FILE) then
|
||||
Util.writeFile(STARTUP_FILE,
|
||||
[[os.sleep(1)
|
||||
shell.openForegroundTab('packages/farms/rancher.lua')]])
|
||||
shell.openForegroundTab('rancher.lua')]])
|
||||
print('Autorun program created: ' .. STARTUP_FILE)
|
||||
end
|
||||
|
||||
local dispenser = Peripheral.lookup('type/minecraft:dispenser')
|
||||
|
||||
@@ -81,7 +81,8 @@ 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')]])
|
||||
shell.openForegroundTab('treefarm.lua')]])
|
||||
print('Autorun program created: ' .. STARTUP_FILE)
|
||||
end
|
||||
|
||||
local clock = os.clock()
|
||||
|
||||
Reference in New Issue
Block a user