Module:Param Parse: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
Im Wired In (talk | contribs) (Add params for Module:Infobox Monster) |
Thingummywut (talk | contribs) (Adding support for description instead of examine; there is no "examine" in this game.) |
||
Line 131: | Line 131: | ||
func = {name = parse.get_rarity_func, params = {Infobox.raw_param('name')}} |
func = {name = parse.get_rarity_func, params = {Infobox.raw_param('name')}} |
||
} |
} |
||
-- Standardized |
-- Standardized description function |
||
function parse.description_func(description, examine) |
|||
if not Infobox.isDefined(description) and Infobox.isDefined(examine) then |
|||
description = examine |
|||
end |
|||
return parse.has_content(description) |
|||
end |
|||
parse.description = { |
|||
name = 'description', |
|||
func = {name = parse.description_func, params = {Infobox.raw_param('description'), Infobox.raw_param('examine')}}, |
|||
smw_property = 'Description', |
|||
category_incomplete = 'Needs description', |
|||
} |
|||
-- Standardized examine function ("examine" doesn't exist in this game, but kept |
|||
-- temporarily until all infoboxes use the description above.) |
|||
parse.examine = { |
parse.examine = { |
||
name = 'examine', |
name = 'examine', |