Anonymous

Module:Items: Difference between revisions

From Melvor Idle
Fixed string.upper call
m (typo fix)
(Fixed string.upper call)
(One intermediate revision by the same user not shown)
Line 187: Line 187:
   if asString then
   if asString then
     if skill ~= nil then
     if skill ~= nil then
       return Constants.getModifierText(modifier, {skill, result})
       return Constants._getModifierText(modifier, {skill, result})
     else
     else
       return Constants.getModifierText(modifier, result)
       return Constants._getModifierText(modifier, result)
     end
     end
   else
   else
Line 202: Line 202:
   local asString = frame.args ~= nil and frame.args[4] or frame[4]
   local asString = frame.args ~= nil and frame.args[4] or frame[4]
   if asString ~= nil then
   if asString ~= nil then
     if strupper(asString) == 'FALSE' then
     if string.upper(asString) == 'FALSE' then
     asString = false
     asString = false
     else
     else
Line 294: Line 294:
     local modArray = {}
     local modArray = {}
     for bonus, value in Shared.skpairs(item.modifiers) do
     for bonus, value in Shared.skpairs(item.modifiers) do
       table.insert(modArray, Constants.getModifierText(bonus, value, false))
       table.insert(modArray, Constants._getModifierText(bonus, value, false))
     end
     end
     result = result.."\r\n|-\r\n|'''Bonuses:'''\r\n"..table.concat(modArray, "<br/>")
     result = result.."\r\n|-\r\n|'''Bonuses:'''\r\n"..table.concat(modArray, "<br/>")