Module:Items/ComparisonTables: Difference between revisions

_getEquipmentTable: Allow word wrap in modifiers column
(_getEquipmentTable: Fix weapon type detection for ranged weapons equipped to the quiver slot (javelin, knives))
(_getEquipmentTable: Allow word wrap in modifiers column)
Line 192: Line 192:
       --If requested, add the item Modifiers
       --If requested, add the item Modifiers
       if includeModifiers then
       if includeModifiers then
         table.insert(resultPart, '\r\n|style="text-align:left;white-space:nowrap;padding:0 0.5em 0 0.5em;"|')
         table.insert(resultPart, '\r\n|style="text-align:left;padding:0 0.5em 0 0.5em;"|')
         table.insert(resultPart, Constants.getModifiersText(item.modifiers, true))
         table.insert(resultPart, Constants.getModifiersText(item.modifiers, true))
       end
       end
Line 218: Line 218:
       --If requested, add the item Modifiers
       --If requested, add the item Modifiers
       if includeModifiers then
       if includeModifiers then
         table.insert(resultPart, '\r\n|style="text-align:left;white-space:nowrap;padding:0 0.5em 0 0.5em;"|')
         table.insert(resultPart, '\r\n|style="text-align:left;padding:0 0.5em 0 0.5em;"|')
         table.insert(resultPart, Constants.getModifiersText(item.modifiers, true))
         table.insert(resultPart, Constants.getModifiersText(item.modifiers, true))
       end
       end