Module:Param Parse: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(Rename additional episode property)
(Use default episode_smw func for additional_episode)
Line 162: Line 162:
category_incomplete = 'Needs episode',
category_incomplete = 'Needs episode',
}
}
function parse.additional_episode_smw(episode)
local valid_episode = valid_episodes[string.lower(episode or '')]
if valid_episode then
return "additional_" .. valid_episode
end
return nil
end
parse.additional_episode = {
parse.additional_episode = {
name = 'additional_episode',
name = 'additional_episode',
func = parse.episode_func,
func = parse.episode_func,
smw_property = 'Additional Episode',
smw_property = 'Additional Episode',
smw_func = parse.additional_episode_smw,
smw_func = parse.episode_smw,
category_incomplete = '',
category_incomplete = '',
}
}