This commit is contained in:
kepler155c
2018-10-27 21:35:21 -04:00
parent d227d6ebb7
commit 57e7a574c4
16 changed files with 518 additions and 288 deletions

View File

@@ -129,6 +129,20 @@ function Milo:clearGrid()
return clear() or clear()
end
function Milo:getTurtleInventory()
local list = { }
for i = 1,16 do
-- TODO: update item db
local item = self.context.introspectionModule.getInventory().getItemMeta(i)
if item then
itemDB:add(item)
list[i] = item
end
end
itemDB:flush()
return list
end
function Milo:eject(item, qty)
local s, m = pcall(function()
self.context.storage:provide(item, qty)