Module:Room features: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 17:
'[[Located in::' .. location .. ']]',
'?Location object#-',
'?Location object.Name=name_sub',
'?Location object.Image#-=image_sub',
'?Location object.Infobox=infobox_sub',
'?Location quantity',
'?#-',
'?Name=name',
'?Image#-=image',
'?Infobox=infobox'
}
return ret
Line 37 ⟶ 41:
end
for i,v in ipairs(query) do
local key = infobox_cat_map[v.
table.insert(results_by_type[key], v)
end
Line 46 ⟶ 50:
local gallery = '<gallery>\n'
for i,v in ipairs(results) do
local image = v.
local quantity = ''
if v['Location quantity'] and v['Location quantity'] ~= 'Unknown' then
quantity = string.format('%s × ', v['Location quantity'])
end
gallery = gallery .. string.format('%s|%s[[%s|%s]]\n', image, quantity, v['Location object'] or v[1], v.
end
gallery = gallery .. '</gallery>\n\n'
Line 59 ⟶ 63:
end
end
mw.log(ret)
return frame:preprocess(ret)
|