Module:Param Parse: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(Add a real smw property for quest difficulty)
No edit summary
Line 354: Line 354:
function parse.difficulty_smw(val)
function parse.difficulty_smw(val)
val = tonumber(val) -- Intentionally do not use parse.tonumber here
val = tonumber(val) -- Intentionally do not use parse.tonumber here
if val == nil then
return nil
end
if val >= 0 and val <= 5 and math.floor(val) == val then
if val >= 0 and val <= 5 and math.floor(val) == val then
return val
return val