Module:Param Parse: Difference between revisions

no edit summary
(Try to prettify invalid profession bubbles)
No edit summary
Line 4:
-- <nowiki>
local Infobox = require('Module:Infobox')
local currency = require('Module:Currency').parse
 
local parse = {}
Line 198 ⟶ 199:
-- Value
function parse.value_func(val)
valreturn = parse.numbercurrency(val)
if val == nil then
return nil
end
local output = ''
local gold = math.floor(val / 1000000)
if gold > 0 then
output = gold .. '[[File:Gold coin.png|link=]] '
val = val - (gold * 1000000)
end
local silver = math.floor(val / 1000)
if (silver > 0) or (gold > 0) then
output = output .. silver .. '[[File:Silver coin.png|link=]] '
val = val - (silver * 1000)
end
output = output .. val .. '[[File:Copper coin.png|link=]]'
return output
end
parse.value = {