Module:Param Parse: Difference between revisions
Cleaning up module, and adding episode
No edit summary |
(Cleaning up module, and adding episode) |
||
Line 5:
local param = {}
function param.name(arg)▼
end▼
Line 16 ⟶ 10:
function param.has_content(arg, default)
-- Return arg if any non-whitespace character is found
return string.match(arg or '', '%S') and arg or
end▼
return nil▼
end▼
return 'N/A'▼
end▼
return release▼
end
Line 43 ⟶ 18:
if img and img:find('%S') then
return img
return nil▼
end
end
function param.image_smw(img)
end
Line 60 ⟶ 30:
num = string.gsub(num or '',',','')
return tonumber(num)
▲end
-- Episode
local valid_episodes = {['Hopeport'] = 1, ['Hopeforest'] = 1, ['Mine of Mantuban'] = 1, ['Crenopolis'] = 1}
if valid_episodes[episode] then
return '[[File:'..episode..' episode icon.png|18px]]'
▲ end
▲end
function param.episode_smw(episode)
if valid_episodes[episode] then
▲ end
end
|