Module:Param Parse: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 464:
 
-- Unlock Level
function parse.unlock_level_func(levelprofession, professionlevel)
local level_numlevel_valid = parse.number(level)
local profession_valid = parse.has_content(profession)
return '[[File:'..profession..'_icon.png|link='..profession..'|width=18x18]] '..level_num
return '[[File:'..professionprofession_valid..'_icon.png|link='..professionprofession_valid..'|width=18x18]] '..level_numlevel_valid
end
 
function parse.unlock_level_smw(profession, level)
local profession_valid = parse.has_content(profession)
local level_valid = parse.number(level)
if not profession_valid then
return nil
end
if not level_valid then
return nil
end
return profession_valid..','..level_valid
end
 
parse.unlock_level = {
name = 'unlock_level',
func = {name = parse.unlock_level_func, params = {Infobox.raw_param('unlock_levelprofession_a'), Infobox.raw_param('profession_aunlock_level')}},
smw_property = 'Unlocked at',
smw_func = parse.unlock_level_smw
}
 
131

edits