Module:Sandbox/User:Alsang: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
Tag: Manual revert
No edit summary
Line 37: Line 37:
-- Query for data
-- Query for data
local smw_data = mw.smw.ask{
local smw_data = mw.smw.ask{
'[[Uses item::' .. item .. ']]',
'[[Activity Input::' .. item .. ']]',
'?Uses item',
'?Activity Input',
'?Recipe JSON',
'?Activity JSON',
showValues and '?Value',
showValues and '?Value',
limit = limit
limit = limit
Line 52: Line 52:
local produced_items = {}
local produced_items = {}
for _, product in ipairs(smw_data) do
for _, product in ipairs(smw_data) do
local jsons = product['Recipe JSON']
local jsons = product['Activity JSON']
if type(jsons) == 'string' then
if type(jsons) == 'string' then
jsons = { jsons }
jsons = { jsons }