Module:Icons: Difference between revisions

Moved quantity in front of icon to match game's formatting
(Change to SkillReq formatting)
(Moved quantity in front of icon to match game's formatting)
Line 59: Line 59:
   result = result..']]'
   result = result..']]'


   if qty ~= nil and qty ~= '' then result = result..' '..Shared.formatnum(qty) end
   if qty ~= nil and qty ~= '' then result = Shared.formatnum(qty)..' '..result end


   if not notext then  
   if not notext then  
Line 108: Line 108:
function p.GP(amt, maxamt)
function p.GP(amt, maxamt)
   local result = '[[File:Coins.svg|25px|link=Coins]]'
   local result = '[[File:Coins.svg|25px|link=Coins]]'
  result = result..' '..Shared.formatnum(amt)
  if maxamt ~= nil then result = result..' - '..Shared.formatnum(maxamt) end
  result = '<span style="display:inline-block">'..result..'</span>'
  return result
end
function p.SC(amt, maxamt)
  local result = '[[File:Slayer Coins.svg|25px|link=Currency#Slayer Coins]]'
   result = result..'&nbsp;'..Shared.formatnum(amt)
   result = result..'&nbsp;'..Shared.formatnum(amt)
   if maxamt ~= nil then result = result..' - '..Shared.formatnum(maxamt) end
   if maxamt ~= nil then result = result..' - '..Shared.formatnum(maxamt) end