Module:Icons: Difference between revisions

Changed SkillReq formatting
mNo edit summary
(Changed SkillReq formatting)
Line 87: Line 87:
end
end


function p._SkillReq(skill, level)
function p._SkillReq(skill, level, showText)
   local result = '[[File:'..skill..'_(skill).svg|25px|link='..skill..']]'
   local result = ' [[File:'..skill..'_(skill).svg|25px|link='..skill..']]'
   result = result.." '''"..level.."'''"
   result = "Lv "..level..result
  if showText then
    result = result..' [['..skill..']]'
  end


   result = '<span style="display:inline-block">'..result..'</span>'
   result = '<span style="display:inline-block">'..result..'</span>'
Line 99: Line 102:
   local skill = args[1]
   local skill = args[1]
   local level = tonumber(args[2])
   local level = tonumber(args[2])
   return p._SkillReq(skill, level)
  local showText = args.showText ~= nil and args.showText ~= '' and args.showText ~= 'false'
   return p._SkillReq(skill, level, showText)
end
end