Anonymous

Module:Icons: Difference between revisions

From Melvor Idle
Adding overrides for resupplies.
(Implement RC function & standardise currency functions)
(Adding overrides for resupplies.)
(One intermediate revision by the same user not shown)
Line 47: Line 47:
   ['Melee'] = 'Combat',
   ['Melee'] = 'Combat',
   ['Spider (lv. 51)'] = 'Spider',
   ['Spider (lv. 51)'] = 'Spider',
   ['Spider (lv. 52)'] = 'Spider2'
   ['Spider (lv. 52)'] = 'Spider2',
  ['Basic Resupply'] = 'Lobster',
  ['Standard Resupply'] = 'Crab',
  ['Generous Resupply'] = 'Shark'
}
}
--When calling for an icon for Key, the link goes to Value
--When calling for an icon for Key, the link goes to Value
Line 196: Line 199:
function p._Currency(fileName, link, amt, maxAmt)
function p._Currency(fileName, link, amt, maxAmt)
   local amtText = Shared.formatnum(amt)
   local amtText = Shared.formatnum(amt)
   if maxAmt ~= nil and maxAmt ~= amt then
   if maxAmt ~= nil and maxAmt >= amt then
     amtText = amtText .. ' - ' .. Shared.formatnum(maxAmt)
     amtText = amtText .. ' - ' .. Shared.formatnum(maxAmt)
   end
   end