Module:Items: Difference between revisions

Swapped to using Constants.getModifiersText in one place
(Changed Bonuses -> Modifiers in infobox, added color coding)
(Swapped to using Constants.getModifiersText in one place)
Line 311: Line 311:
   --For items with modifiers, show what those are
   --For items with modifiers, show what those are
   if item.modifiers ~= nil and Shared.tableCount(item.modifiers) > 0 then
   if item.modifiers ~= nil and Shared.tableCount(item.modifiers) > 0 then
    local modArray = {}
     result = result.."\r\n|-\r\n|'''Modifiers:'''\r\n"..Constants.getModifiersText(item.modifiers, true)
    for bonus, value in Shared.skpairs(item.modifiers) do
      table.insert(modArray, Constants._getModifierText(bonus, value, true))
    end
     result = result.."\r\n|-\r\n|'''Modifiers:'''\r\n"..table.concat(modArray, "<br/>")
   end
   end
   return result
   return result