monitor manager
This commit is contained in:
@@ -725,8 +725,6 @@ local function getTurtleInventory()
|
|||||||
local items = turtleChestAdapter:listItems()
|
local items = turtleChestAdapter:listItems()
|
||||||
_, inventory[i] = next(items)
|
_, inventory[i] = next(items)
|
||||||
turtleChestAdapter:extract(1, qty, i)
|
turtleChestAdapter:extract(1, qty, i)
|
||||||
debug(inventory[i])
|
|
||||||
read()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return inventory
|
return inventory
|
||||||
|
|||||||
@@ -5,12 +5,7 @@ local Util = require('util')
|
|||||||
|
|
||||||
local function syntax()
|
local function syntax()
|
||||||
printError('Syntax:')
|
printError('Syntax:')
|
||||||
printError('Start a new session')
|
print('monitorManager [session file] [monitor]')
|
||||||
print('monitorManager start [configFile] [monitor]')
|
|
||||||
print()
|
|
||||||
printError('Run programs in session')
|
|
||||||
print('monitorManager run [program] [arguments]')
|
|
||||||
print()
|
|
||||||
error()
|
error()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -281,7 +276,7 @@ function defaultEnv.multishell.setTitle(uid, title)
|
|||||||
local process = Util.find(processes, 'uid', uid)
|
local process = Util.find(processes, 'uid', uid)
|
||||||
if process then
|
if process then
|
||||||
process.title = title or ''
|
process.title = title or ''
|
||||||
process:focus(processs == processes[#processes])
|
process:focus(process == processes[#processes])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -367,7 +362,7 @@ local function addShell()
|
|||||||
|
|
||||||
process.co = coroutine.create(function()
|
process.co = coroutine.create(function()
|
||||||
while true do
|
while true do
|
||||||
os.run(defaultEnv, shell.resolveProgram('shell'))
|
os.run(Util.shallowCopy(defaultEnv), shell.resolveProgram('shell'))
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user