Anonymous

Module:ModifierTables: Difference between revisions

From Melvor Idle
Added TotH icon to modifiers table
(Fix modifier table, was previously horribly broken)
(Added TotH icon to modifiers table)
Line 283: Line 283:
row.name = item.name
row.name = item.name
row.icon = Icons.Icon({item.name, type='item'})
row.icon = Icons.Icon({item.name, type='item'})
row.expIcon = Icons.getExpansionIcon(item.id)
row.type = 'Item'
row.type = 'Item'
--For equipment, show the slot they go in
--For equipment, show the slot they go in
Line 308: Line 309:
row.name = pet.name
row.name = pet.name
row.icon = Icons.Icon({pet.name, type='pet'})
row.icon = Icons.Icon({pet.name, type='pet'})
row.expIcon = Icons.getExpansionIcon(pet.id)
row.type = '[[Pets|Pet]]'
row.type = '[[Pets|Pet]]'
local totalVal = 0
local totalVal = 0
Line 329: Line 331:
row.name = obst.name
row.name = obst.name
row.icon = Icons.Icon({'Agility', obst.name, type='skill'})
row.icon = Icons.Icon({'Agility', obst.name, type='skill'})
row.expIcon = Icons.getExpansionIcon(obst.id)
row.type = '[[Agility#Obstacles|Agility Obstacle '..tostring(tonumber(obst.category)+1)..']]'
row.type = '[[Agility#Obstacles|Agility Obstacle '..tostring(tonumber(obst.category)+1)..']]'
local totalVal = 0
local totalVal = 0
Line 350: Line 353:
row.name = pillar.name
row.name = pillar.name
row.icon = Icons.Icon({'Agility', pillar.name, type='skill'})
row.icon = Icons.Icon({'Agility', pillar.name, type='skill'})
row.expIcon = Icons.getExpansionIcon(pillar.id)
row.type = '[[Agility#Passive Pillars|Agility Pillar]]'
row.type = '[[Agility#Passive Pillars|Agility Pillar]]'
local totalVal = 0
local totalVal = 0
Line 371: Line 375:
row.name = prayer.name
row.name = prayer.name
row.icon = Icons.Icon({prayer.name, type='prayer'})
row.icon = Icons.Icon({prayer.name, type='prayer'})
row.expIcon = Icons.getExpansionIcon(prayer.id)
row.type = [[Prayer]]
row.type = [[Prayer]]
local totalVal = 0
local totalVal = 0
Line 392: Line 397:
row.name = Shop._getPurchaseName(upgrade)
row.name = Shop._getPurchaseName(upgrade)
row.icon = Icons.Icon({row.name, type='upgrade'})
row.icon = Icons.Icon({row.name, type='upgrade'})
row.expIcon = Icons.getExpansionIcon(upgrade.id)
row.type = '[[Shop|Upgrade]]'
row.type = '[[Shop|Upgrade]]'
local totalVal = 0
local totalVal = 0
Line 413: Line 419:
row.name = cons.name
row.name = cons.name
row.icon = Icons.Icon({cons.name, type='constellation'})
row.icon = Icons.Icon({cons.name, type='constellation'})
row.expIcon = Icons.getExpansionIcon(cons.id)
row.type = '[[Astrology#Constellations|Constellation]]'
row.type = '[[Astrology#Constellations|Constellation]]'
row.val = 15 -- Assume highest possible, the range is 1 to 15 inclusive
row.val = 15 -- Assume highest possible, the range is 1 to 15 inclusive
Line 445: Line 452:
result = result..'\r\n|-'
result = result..'\r\n|-'
result = result..'\r\n|data-sort-value="'..row.name..'"|'..row.icon
result = result..'\r\n|data-sort-value="'..row.name..'"|'..row.icon
result = result..'||'..row.type..'||data-sort-value="'..row.val..'"| '..row.modifierText
result = result..'||data-sort-value="'..row.type..'"|'..row.expIcon..row.type..'||data-sort-value="'..row.val..'"| '..row.modifierText
if hasOtherModifiers and displayOtherMods then
if hasOtherModifiers and displayOtherMods then
result = result..'|| '..row.otherModifiers
result = result..'|| '..row.otherModifiers
Line 480: Line 487:


return p._getModifierTable(modifier, skill, columnName, getOpposites, displayOtherMods, maxOtherMods)
return p._getModifierTable(modifier, skill, columnName, getOpposites, displayOtherMods, maxOtherMods)
end
--Function for console testing of modifier tables
function p.getModifierTableTest()
return p.getModifierTable({args = {'MeleeMaxHit', 'GP Boosts'}})
end
end


return p
return p