milo wip
This commit is contained in:
@@ -25,7 +25,6 @@ function Milo:requestCrafting(item)
|
||||
item.ingredients = {
|
||||
[ key ] = item
|
||||
}
|
||||
-- item.ingredients[key] = item
|
||||
item.crafted = 0
|
||||
self.context.craftingQueue[key] = item
|
||||
end
|
||||
@@ -66,17 +65,11 @@ function Milo:uniqueKey(item)
|
||||
end
|
||||
|
||||
function Milo:resetCraftingStatus()
|
||||
|
||||
-- todo: move to end of processing tasks ?
|
||||
-- what if someone hoppers in items ? -- this shouldnt be allowed
|
||||
-- all items must come in via pullItems
|
||||
self.context.inventoryAdapter.activity = { }
|
||||
|
||||
for _,key in pairs(Util.keys(self.context.craftingQueue)) do
|
||||
local item = self.context.craftingQueue[key]
|
||||
if item.crafted >= item.count then
|
||||
debug('removing:')
|
||||
debug(item)
|
||||
self.context.craftingQueue[key] = nil
|
||||
end
|
||||
end
|
||||
@@ -204,4 +197,9 @@ function Milo:listItems()
|
||||
return self.context.inventoryAdapter:listItems()
|
||||
end
|
||||
|
||||
-- force a full rescan of chests
|
||||
function Milo:refreshItems()
|
||||
return self.context.inventoryAdapter:refresh()
|
||||
end
|
||||
|
||||
return Milo
|
||||
|
||||
Reference in New Issue
Block a user