No need to check if a key is contained, just index it doh

This commit is contained in:
Luca_S
2020-05-09 20:42:44 +02:00
parent 21b4d7a78c
commit ca808cdd7d

View File

@@ -327,7 +327,7 @@ function Storage:listProviders(throttle)
if not res[key] then
res[key] = {}
end
table.insert(res[key], {item = item, device = device[chest], lockedToThis = Util.contains(Util.keys(self.nodes[chest].lock or {}), key) and true or false, slot = slot})
table.insert(res[key], {item = item, device = device[chest], lockedToThis = (self.nodes[chest].lock or {})[key] or false, slot = slot})
end
end
return res