Module:Items: Difference between revisions

Slight formatting change
(Added linebreaks to p.getItemSources)
(Slight formatting change)
Line 349: Line 349:
       count1 = count1 + 1
       count1 = count1 + 1
       if string.len(killStr) > 0 then
       if string.len(killStr) > 0 then
        killStr = killStr..','
         if count1 % 3 == 1 and count1 > 1 then killStr = killStr..'<br/>' end
         if count1 % 3 == 1 and count1 > 1 then killStr = killStr..'<br/>' end
         killStr = killStr..','..Icons.Icon({monster.name, type="monster", notext="true"})
         killStr = killStr..Icons.Icon({monster.name, type="monster", notext="true"})
       else
       else
         killStr = killStr..'Killing: '..Icons.Icon({monster.name, type="monster", notext="true"})
         killStr = killStr..'Killing: '..Icons.Icon({monster.name, type="monster", notext="true"})
Line 373: Line 374:
           count1 = count1 + 1
           count1 = count1 + 1
           if string.len(lootStr) > 0 then
           if string.len(lootStr) > 0 then
            lootStr = lootStr..','
             if count1 % 3 == 1 and count1 > 1 then lootStr = lootStr..'<br/>' end
             if count1 % 3 == 1 and count1 > 1 then lootStr = lootStr..'<br/>' end
             lootStr = lootStr..','..Icons.Icon({item2.name, type="item", notext="true"})
             lootStr = lootStr..Icons.Icon({item2.name, type="item", notext="true"})
           else
           else
             lootStr = lootStr..'Opening: '..Icons.Icon({item2.name, type="item", notext="true"})
             lootStr = lootStr..'Opening: '..Icons.Icon({item2.name, type="item", notext="true"})
Line 384: Line 386:
           count2 = count2 + 1
           count2 = count2 + 1
         if string.len(upgradeStr) > 0 then
         if string.len(upgradeStr) > 0 then
          upgradeStr = upgradeStr..','
           if count2 % 3 == 1 and count2 > 1 then upgradeStr = upgradeStr..'<br/>' end
           if count2 % 3 == 1 and count2 > 1 then upgradeStr = upgradeStr..'<br/>' end
           upgradeStr = upgradeStr..','..Icons.Icon({item2.name, type="item", notext="true"})
           upgradeStr = upgradeStr..Icons.Icon({item2.name, type="item", notext="true"})
         else
         else
           upgradeStr = upgradeStr..'Upgrading: '..Icons.Icon({item2.name, type="item", notext="true"})
           upgradeStr = upgradeStr..'Upgrading: '..Icons.Icon({item2.name, type="item", notext="true"})