Module:Param Parse: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(Add incomplete categories)
No edit summary
Line 83: Line 83:


-- Episode
-- Episode
local valid_episodes = {['Hopeport'] = 1, ['Hopeforest'] = 1, ['Mine of Mantuban'] = 1, ['Crenopolis'] = 1}
local valid_episodes = {
['hopeport'] = 'Hopeport',
['hopeforest'] = 'Hopeforest',
['mine of mantuban'] = 'Mine of Mantuban',
['crenopolis'] = 'Crenopolis'
}
function parse.episode_func(episode)
function parse.episode_func(episode)
if valid_episodes[episode] then
local valid_episode = valid_episodes[string.lower(episode or '')]
if valid_episode then
return '[[File:'..episode..' episode icon.png|18px]] [['..episode..']]'
return '[[File:'..valid_episode..' episode icon.png|18px]] [['..valid_episode..']]'
end
end
return nil
return nil
end
end
function parse.episode_smw(episode)
function parse.episode_smw(episode)
if valid_episodes[episode] then
local valid_episode = valid_episodes[string.lower(episode or '')]
if valid_episode then
return episode
return valid_episode
end
end
return nil
return nil