Anonymous

Module:Monsters: Difference between revisions

From Melvor Idle
Substitute links with Icons.Icon() where possible to benefit from ambiguous link handling
(Added handling for items that haven't been added yet)
(Substitute links with Icons.Icon() where possible to benefit from ambiguous link handling)
Line 990: Line 990:
       local monsterGP = p._getMonsterAverageGP(monster)
       local monsterGP = p._getMonsterAverageGP(monster)
       local combatLevel = p._getMonsterCombatLevel(monster, 'Combat Level')
       local combatLevel = p._getMonsterCombatLevel(monster, 'Combat Level')
       result = result..'\r\n|-\r\n|[['..monster.name..']]||'..combatLevel..'||'..monsterGP
       result = result..'\r\n|-\r\n|'..Icons.Icon({monster.name, type='monster', noicon=true})..'||'..combatLevel..'||'..monsterGP
     end
     end
   end
   end
Line 1,092: Line 1,092:


     table.insert(tableParts, '\r\n|-\r\n|style="text-align: center;" |' .. Icons.Icon({monster.name, type='monster', size=50, notext=true}))
     table.insert(tableParts, '\r\n|-\r\n|style="text-align: center;" |' .. Icons.Icon({monster.name, type='monster', size=50, notext=true}))
     table.insert(tableParts, '\r\n|style="text-align:left" |[[' .. monster.name .. ']]')
     table.insert(tableParts, '\r\n|style="text-align:left" |' .. Icons.Icon({monster.name, type='monster', noicon=true}))
     table.insert(tableParts, '\r\n|style="text-align:right" |' .. monsterID)
     table.insert(tableParts, '\r\n|style="text-align:right" |' .. monsterID)
     table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. cmbLevel .. '" |' .. Shared.formatnum(cmbLevel))
     table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. cmbLevel .. '" |' .. Shared.formatnum(cmbLevel))