milo storage filter + crafting fixes
This commit is contained in:
@@ -1,23 +1,14 @@
|
||||
local Milo = require('milo')
|
||||
|
||||
local device = _G.device
|
||||
|
||||
local InputChest = {
|
||||
name = 'input',
|
||||
priority = 10,
|
||||
}
|
||||
|
||||
function InputChest:cycle(context)
|
||||
for source,v in pairs(context.config.remoteDefaults) do
|
||||
if v.mtype == 'input' then
|
||||
local inventory = device[source]
|
||||
|
||||
local list = inventory and inventory.list and inventory.list()
|
||||
if list then
|
||||
for slot, item in pairs(list) do
|
||||
context.storage:import(source, slot, item.count, item)
|
||||
end
|
||||
end
|
||||
for inventory in context.storage:filterActive('input') do
|
||||
for slot, item in pairs(inventory.adapter.list()) do
|
||||
context.storage:import(inventory.name, slot, item.count, item)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user