Module:Room features: Difference between revisions
variant categories will now be sorted by their category type
No edit summary |
(variant categories will now be sorted by their category type) |
||
Line 7:
local infobox_cat_map = {
['
['
['
['
['
['
['variant_category'] = 'Variants',
}
Line 27:
'?Location object.Image#-=image_sub',
'?Location object.Infobox=infobox_sub',
'?Location object.Variant type=vartype_sub',
'?Location quantity',
'?#-',
Line 48 ⟶ 49:
results_by_type[v] = {}
end
for i,v in ipairs(query) do
local
--convert to all lower case with underscores instead of spaces, for best possible matching
infobox_type = string.lower(infobox_type)
infobox_type = string.gsub(infobox_type,' ','_')
local key = infobox_cat_map[infobox_type]
-- Can be nil - See East Beach for example
if key ~= nil then
|