Anonymous

Module:Icons: Difference between revisions

From Melvor Idle
Added GP function
(man fuck those stupid identically named spiders, amirite?)
(Added GP function)
Line 3: Line 3:


local p = {}
local p = {}
local Shared= require("Module:Shared")


function p.Icon(frame)
function p.Icon(frame)
Line 36: Line 38:
   result = result..']]'
   result = result..']]'


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


   if not notext then  
   if not notext then  
Line 59: Line 61:
   end
   end


  return result
end
function p.GP(amt, maxamt)
  local result = p.Icon({'Coins', notext=true})
  result = result..' '..Shared.formatnum(amt)
  if maxamt ~= nil then result = result..' - '..Shared.formatnum(maxamt) end
   return result
   return result
end
end


return p
return p