Module:Skills/Summoning: Difference between revisions

Substitute links with Icons.Icon() where possible to benefit from ambiguous link handling
(getTabletTable: Fix max hit for 0.21 data format change)
(Substitute links with Icons.Icon() where possible to benefit from ambiguous link handling)
Line 34: Line 34:
     local rowText = '|-'
     local rowText = '|-'
     rowText = rowText..'\r\n|data-sort-value="'..Fam.name..'"|'..Icons.Icon({Fam.name, type='mark', notext=true, size='50'})
     rowText = rowText..'\r\n|data-sort-value="'..Fam.name..'"|'..Icons.Icon({Fam.name, type='mark', notext=true, size='50'})
     rowText = rowText..'||[['..Fam.name..'|Mark of the '..Fam.name..']]'
     rowText = rowText..'||'..Icons.Icon({Fam.name, 'Mark of the ' .. Fam.name, type='mark', noicon=true})
     rowText = rowText..'||style="text-align:right"|'..Fam.summoningLevel
     rowText = rowText..'||style="text-align:right"|'..Fam.summoningLevel
     local discoveredArray = {}
     local discoveredArray = {}
Line 76: Line 76:
     local rowText = '|-'
     local rowText = '|-'
     rowText = rowText..'\r\n|data-sort-value="'..Fam.name..'"|'..Icons.Icon({Fam.name, type='item', notext=true, size='50'})
     rowText = rowText..'\r\n|data-sort-value="'..Fam.name..'"|'..Icons.Icon({Fam.name, type='item', notext=true, size='50'})
     rowText = rowText..'||[['..Fam.name..']]'
     rowText = rowText..'||'..Icons.Icon({Fam.name, type='item', noicon=true})
     rowText = rowText..'||style="text-align:right"|'..Fam.summoningLevel
     rowText = rowText..'||style="text-align:right"|'..Fam.summoningLevel
     rowText = rowText..'||style="text-align:right"|'..Fam.summoningTier
     rowText = rowText..'||style="text-align:right"|'..Fam.summoningTier
Line 148: Line 148:
       local Fam2 = FamArrayByID[j]
       local Fam2 = FamArrayByID[j]
       local rowText = '|-'
       local rowText = '|-'
       rowText = rowText..'\r\n|data-sort-value="'..Fam1.name..'"|'..Icons.Icon({Fam1.name, type='item', notext=true, size='30'})..'||[['..Fam1.name..']]'
       rowText = rowText..'\r\n|data-sort-value="'..Fam1.name..'"|'..Icons.Icon({Fam1.name, type='item', notext=true, size='30'})
       rowText = rowText..'||data-sort-value="'..Fam2.name..'"|'..Icons.Icon({Fam2.name, type='item', notext=true, size='30'})..'||[['..Fam2.name..']]'
      rowText = rowText..'||'..Icons.Icon({Fam1.name, type='item', noicon=true})
       rowText = rowText..'||data-sort-value="'..Fam2.name..'"|'..Icons.Icon({Fam2.name, type='item', notext=true, size='30'})
      rowText = rowText..'||'..Icons.Icon({Fam2.name, type='item', noicon=true})
       rowText = rowText..'||'..Syn.description
       rowText = rowText..'||'..Syn.description


Line 190: Line 192:
       if i - 1 == familiar.summoningID or j - 1 == familiar.summoningID then
       if i - 1 == familiar.summoningID or j - 1 == familiar.summoningID then
         local rowText = '|-'
         local rowText = '|-'
         rowText = rowText..'\r\n|data-sort-value="'..Fam1.name..'"|'..Icons.Icon({Fam1.name, type='item', notext=true, size='30'})..'||[['..Fam1.name..']]'
         rowText = rowText..'\r\n|data-sort-value="'..Fam1.name..'"|'..Icons.Icon({Fam1.name, type='item', notext=true, size='30'})
         rowText = rowText..'||data-sort-value="'..Fam2.name..'"|'..Icons.Icon({Fam2.name, type='item', notext=true, size='30'})..'||[['..Fam2.name..']]'
        rowText = rowText..'||'..Icons.Icon({Fam1.name, type='item', noicon=true})
         rowText = rowText..'||data-sort-value="'..Fam2.name..'"|'..Icons.Icon({Fam2.name, type='item', notext=true, size='30'})
        rowText = rowText..'||'..Icons.Icon({Fam2.name, type='item', noicon=true})
         rowText = rowText..'||'..Syn.description
         rowText = rowText..'||'..Syn.description


Line 259: Line 263:
   for i, rowItem in Shared.skpairs(rowArray) do
   for i, rowItem in Shared.skpairs(rowArray) do
     result = result..'\r\n|-'
     result = result..'\r\n|-'
     result = result..'\r\n|data-sort-value="'..rowItem.Fam1..'"|'..Icons.Icon({rowItem.Fam1, type='item', notext=true, size='30'})..'||[['..rowItem.Fam1..']]'
     result = result..'\r\n|data-sort-value="'..rowItem.Fam1..'"|'..Icons.Icon({rowItem.Fam1, type='item', notext=true, size='30'})
    result = result..'||'..Icons.Icon({rowItem.Fam1, type='item', noicon=true})
     if rowItem.Fam2 ~= nil then
     if rowItem.Fam2 ~= nil then
       result = result..'||data-sort-value="'..rowItem.Fam2..'"|'..Icons.Icon({rowItem.Fam2, type='item', notext=true, size='30'})..'||[['..rowItem.Fam2..']]'
       result = result..'||data-sort-value="'..rowItem.Fam2..'"|'..Icons.Icon({rowItem.Fam2, type='item', notext=true, size='30'})
      result = result..'||'..Icons.Icon({rowItem.Fam2, type='item', noicon=true})
     else
     else
       result = result..'|| || '
       result = result..'|| || '