milo autorun programs

This commit is contained in:
kepler155c
2018-11-24 14:16:44 -05:00
parent dff7f4bdab
commit 537db89a82
3 changed files with 25 additions and 3 deletions

View File

@@ -21,10 +21,13 @@ local Peripheral = require('peripheral')
local Util = require('util')
local device = _G.device
local fs = _G.fs
local os = _G.os
local peripheral = _G.peripheral
local turtle = _G.turtle
local STARTUP_FILE = 'usr/autorun/miloFurni.lua'
local function equip(side, item, rawName)
local equipped = Peripheral.lookup('side/' .. side)
@@ -50,6 +53,11 @@ local intro = device['plethora:introspection']
local inv = intro.getInventory()
local sides = { 'front', 'back', 'right', 'top' }
if not fs.exists(STARTUP_FILE) then
Util.writeFile(STARTUP_FILE,
[[os.sleep(1)
shell.openForegroundTab('packages/milo/apps/furni')]])
end
-- slot 1: item to cook
-- slot 2: fuel
-- slot 3: return