Module:Param Parse: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
(Try to autogenerate premium status on all pages)
Line 152: Line 152:


-- Premium
-- Premium
local premium_episodes = {
['hopeport'] = 'Yes',
['hopeforest'] = 'Yes',
['mine of mantuban'] = 'No',
['crenopolis'] = 'No'
}
function parse.premium_func(episode)
local premium_episode = premium_episodes[string.lower(episode or '')]
return premium_episode
end
function parse.premium_smw(episode)
return parse.yes_no_smw(parse.premium_func(episode))
end
parse.premium = {
parse.premium = {
name = 'premium',
name = 'premium',
func = {name = parse.premium_func, params = {Infobox.raw_param('episode')}},
func = parse.yes_no,
smw_property = 'Premium',
smw_property = 'Premium',
smw_func = parse.yes_no_smw,
smw_func = {name = parse.premium_smw, params = {Infobox.raw_param('episode')}}
category_incomplete = 'Needs premium status',
}
}