milo: storefront wip

This commit is contained in:
kepler155c@gmail.com
2019-01-11 03:11:17 -05:00
parent 21b7c7c3af
commit 42e72cf3c8
2 changed files with 8 additions and 6 deletions

View File

@@ -128,9 +128,11 @@ end)
Event.on('store_provide', function(_, item, quantity)
local count = 0
local key = Util.find(config, 'name', item)
if key then
count = Milo:eject(itemDB:splitKey(item), quantity)
for k, v in pairs(config) do
if v.name == item then
count = Milo:eject(itemDB:splitKey(k), quantity)
break
end
end
os.queueEvent('store_provided', item, count)
end)