milo perf + cleanup

This commit is contained in:
kepler155c@gmail.com
2019-01-26 00:28:46 -05:00
parent 779d58cd7e
commit bae28521db
7 changed files with 69 additions and 61 deletions

View File

@@ -24,16 +24,16 @@ local machinesTab = UI.Window {
function machinesTab:setItem(item)
self.item = item
local machine = Craft.machineLookup[self.item.key]
local t = Util.filter(context.storage.nodes, function(node)
if node.category == 'machine' or node.category == 'custom' then -- TODO: - need a setting instead (ie. canCraft)
return node.adapter and node.adapter.online and node.adapter.pushItems
end
end)
self.grid:setValues(t)
if machine then
local t = Util.filter(context.storage.nodes, function(node)
if node.category == 'machine' or node.category == 'custom' then -- TODO: - need a setting instead (ie. canCraft)
return node.adapter and node.adapter.online and node.adapter.pushItems
end
end)
self.grid:setValues(t)
self.grid:setSelected('name', machine)
end
self.parent:setActive(self, machine)
self.parent:setActive(self, item.has_recipe)
end
function machinesTab.grid:getDisplayValues(row)