Module:Clickpic: Difference between revisions

Created page with "-- <pre> local p = {} local pics = { Gem = {image='Gemini Icon',link='Gemini Station'}, Earth = {image='Earth Icon',link='Earth'}, Mars = {image='Mars Icon',link='Mars'},..."
 
mNo edit summary
Line 14: Line 14:
function p.main(frame)
function p.main(frame)
local args = frame:getParent().args
local args = frame:getParent().args
local value = args[1] or ''
local skill = args[1] or ''
local level = args[2]
local level = args[2]


return p._main(value, level)
return p._main(skill, level)
end
end


function p._main(value, level)
function p._main(skill, level)
local file
local file
if type(value) == 'string' and pics[value:lower()] then
if type(skill) == 'string' and pics[skill:lower()] then
file = pics[value:lower()]
file = pics[skill:lower()]
else
else
file = pics.stats
file = pics.stats