Module:Param Parse: Difference between revisions
parse.name_export_rarity_class
No edit summary |
(parse.name_export_rarity_class) |
||
Line 117:
smw_property = 'Name',
category_incomplete = 'Needs name',
}
local rarities = {"Common", "Uncommon", "Rare", "Epic"}
function parse.get_rarity_func(name)
for _, rarity in ipairs(rarities) do
if name:sub(1, #rarity) == rarity then
return rarity
end
end
return nil
end
parse.name_export_rarity_class = {
name = 'name_rarity',
func = {name = parse.get_rarity_func, params = {Infobox.raw_param('name')}}
}
-- Standardized examine function
|