Anonymous

Module:ModifierTables: Difference between revisions

From Melvor Idle
for reals fixed the problem with modifier table change
(Fixed issue with modifier table changes)
(for reals fixed the problem with modifier table change)
Line 289: Line 289:
row.type = row.type..' ('..table.concat(Shared.clone(item.validSlots), ', ')..')'
row.type = row.type..' ('..table.concat(Shared.clone(item.validSlots), ', ')..')'
end
end
row.typeText = row.type
local totalVal = 0
local totalVal = 0
for i, mod in pairs(modifiers) do
for i, mod in pairs(modifiers) do
Line 311: Line 312:
row.expIcon = Icons.getExpansionIcon(pet.id)
row.expIcon = Icons.getExpansionIcon(pet.id)
row.type = '[[Pets|Pet]]'
row.type = '[[Pets|Pet]]'
row.typeText = 'Pet'
local totalVal = 0
local totalVal = 0
for i, mod in pairs(modifiers) do
for i, mod in pairs(modifiers) do
Line 333: Line 335:
row.expIcon = Icons.getExpansionIcon(obst.id)
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)..']]'
row.typeText = 'Agility Obstacle '..tostring(tonumber(obst.category)+1)
local totalVal = 0
local totalVal = 0
for i, mod in pairs(modifiers) do
for i, mod in pairs(modifiers) do
Line 355: Line 358:
row.expIcon = Icons.getExpansionIcon(pillar.id)
row.expIcon = Icons.getExpansionIcon(pillar.id)
row.type = '[[Agility#Passive Pillars|Agility Pillar]]'
row.type = '[[Agility#Passive Pillars|Agility Pillar]]'
row.typeText = 'Agility Pillar'
local totalVal = 0
local totalVal = 0
for i, mod in pairs(modifiers) do
for i, mod in pairs(modifiers) do
Line 377: Line 381:
row.expIcon = Icons.getExpansionIcon(prayer.id)
row.expIcon = Icons.getExpansionIcon(prayer.id)
row.type = [[Prayer]]
row.type = [[Prayer]]
row.typeText = 'Prayer'
local totalVal = 0
local totalVal = 0
for i, mod in ipairs(modifiers) do
for i, mod in ipairs(modifiers) do
Line 399: Line 404:
row.expIcon = Icons.getExpansionIcon(upgrade.id)
row.expIcon = Icons.getExpansionIcon(upgrade.id)
row.type = '[[Shop|Upgrade]]'
row.type = '[[Shop|Upgrade]]'
row.typeText = 'Upgrade'
local totalVal = 0
local totalVal = 0
for i, mod in pairs(modifiers) do
for i, mod in pairs(modifiers) do
Line 421: Line 427:
row.expIcon = Icons.getExpansionIcon(cons.id)
row.expIcon = Icons.getExpansionIcon(cons.id)
row.type = '[[Astrology#Constellations|Constellation]]'
row.type = '[[Astrology#Constellations|Constellation]]'
row.typeText = '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 452: Line 459:
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..'|| data-sort-value="'..row.type..'" | '..row.expIcon..row.type..'||data-sort-value="'..row.val..'"| '..row.modifierText
result = result..'|| data-sort-value="'..row.typeText..'" | '..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