Module:Param Parse: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
No edit summary |
No edit summary |
||
Line 513: | Line 513: | ||
smw_property = 'Variant name' |
smw_property = 'Variant name' |
||
} |
} |
||
-- Variant type |
|||
parse.variant_type = { |
|||
name = 'variant', |
|||
func = parse.variant_type_func, |
|||
smw_func = parse.has_content, |
|||
smw_property = 'Variant type', |
|||
category_incomplete = 'Needs variant type' |
|||
} |
|||
local valid_variant_types = { |
|||
['item'] = 'Item', |
|||
['monster'] = 'Monster', |
|||
['skill node'] = 'Skill node' |
|||
} |
|||
function parse.variant_type_func(type) |
|||
local valid_type = valid_variant_types[string.lower(type or '')] |
|||
if valid_type then |
|||
return valid_type..'[[Category:'..valid_type..' variant]]' |
|||
else |
|||
return '[[Category:Invalid variant type]]' |
|||
end |
|||
return nil |
|||
end |
|||
parse.passive = { |
parse.passive = { |