Module:Param Parse: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
(Change value to use parse.number instead of tonumber (supports commas in numbers))
Line 198: Line 198:
-- Value
-- Value
function parse.value_func(val)
function parse.value_func(val)
val = tonumber(val)
val = parse.number(val)
if val == nil then
if val == nil then
return nil
return nil
Line 215: Line 215:
output = output .. val .. '[[File:Copper coin.png|link=]]'
output = output .. val .. '[[File:Copper coin.png|link=]]'
return output
return output
end
function parse.value_smw(val)
return tonumber(val)
end
end
parse.value = {
parse.value = {
Line 224: Line 221:
category_incomplete = 'Items needing value',
category_incomplete = 'Items needing value',
smw_property = 'Value',
smw_property = 'Value',
smw_func = parse.value_smw
smw_func = parse.number
}
}