Module:Param Parse: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
No edit summary |
No edit summary |
||
Line 464: | Line 464: | ||
-- Unlock Level |
-- Unlock Level |
||
function parse.unlock_level_func( |
function parse.unlock_level_func(profession, level) |
||
local |
local level_valid = parse.number(level) |
||
local profession_valid = parse.has_content(profession) |
|||
⚫ | |||
⚫ | |||
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 |
end |
||
parse.unlock_level = { |
parse.unlock_level = { |
||
name = 'unlock_level', |
name = 'unlock_level', |
||
func = {name = parse.unlock_level_func, params = {Infobox.raw_param(' |
func = {name = parse.unlock_level_func, params = {Infobox.raw_param('profession_a'), Infobox.raw_param('unlock_level')}}, |
||
smw_property = 'Unlocked at', |
smw_property = 'Unlocked at', |
||
smw_func = parse.unlock_level_smw |
|||
} |
} |
||