Module:Room features: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
Line 44: Line 44:
end
end
end
end
for cat,v in pairs(results_by_type) do
for cat,results in pairs(results_by_type) do
if #v > 0 then
if #results > 0 then
ret = ret .. '===' .. cat .. '===\n'
ret = ret .. '===' .. cat .. '===\n'
local gallery = '<gallery>\n'
local gallery = '<gallery>\n'
for i,v in ipairs(query or {}) do
for i,v in ipairs(results) do
gallery = gallery .. (v.Image or 'File:Section anchor light.svg') .. '|' .. '[[' .. v[1] .. '|' .. v.Name .. ']]\n'
gallery = gallery .. (v.Image or 'File:Section anchor light.svg') .. '|' .. '[[' .. v[1] .. '|' .. v.Name .. ']]\n'
end
end