Anonymous

Module:CombatAreas/AreaTables: Difference between revisions

From Melvor Idle
Add TotH icon to tables
(Added a function to allow me to quickly update CombatNav. Saving it in case it's useful later.)
(Add TotH icon to tables)
Line 31: Line 31:
for i, area in ipairs(areas) do
for i, area in ipairs(areas) do
result = result..'\r\n|-'
result = result..'\r\n|-'
result = result..'\r\n|'..Icons.Icon({area.name, type='combat', size='50', notext=true})
result = result..'\r\n|class="table-img" data-sort-value="' .. area.name .. '"| '..Icons.Icon({area.name, type='combat', size='50', notext=true})
result = result..'||'..Icons.Icon({area.name, type='combat', noicon=true})
result = result..'||' .. Icons.getExpansionIcon(area.id) .. Icons.Icon({area.name, type='combat', noicon=true})
result = result..'||data-sort-value="'..area.difficulty[1]..'"|'..Areas._getAreaStat(area, 'difficulty')
result = result..'||data-sort-value="'..area.difficulty[1]..'"|'..Areas._getAreaStat(area, 'difficulty')
local lowLvl, highLvl = p.getLowHighLevels(area.monsterIDs)
local lowLvl, highLvl = p.getLowHighLevels(area.monsterIDs)
result = result..'||'..lowLvl..'||'..highLvl
result = result .. '||data-sort-value="' .. lowLvl .. '"| ' .. Shared.formatnum(lowLvl)
result = result .. '||data-sort-value="' .. highLvl .. '"| ' .. Shared.formatnum(highLvl)
end
end
result = result..'\r\n|}'
result = result..'\r\n|}'
Line 50: Line 51:
for i, area in ipairs(areas) do
for i, area in ipairs(areas) do
result = result..'\r\n|-'
result = result..'\r\n|-'
result = result..'\r\n|'..Icons.Icon({area.name, type='slayer', size='50', notext=true})
result = result..'\r\n|class="table-img" data-sort-value="' .. area.name .. '"| '..Icons.Icon({area.name, type='slayer', size='50', notext=true})
result = result..'||'..Icons.Icon({area.name, type='slayer', noicon=true})
result = result..'||' .. Icons.getExpansionIcon(area.id) .. Icons.Icon({area.name, type='slayer', noicon=true})
result = result..'||data-sort-value="'..area.difficulty[1]..'"|'..Areas._getAreaStat(area, 'difficulty')
result = result..'||data-sort-value="'..area.difficulty[1]..'"|'..Areas._getAreaStat(area, 'difficulty')
local lowLvl, highLvl = p.getLowHighLevels(area.monsterIDs)
local lowLvl, highLvl = p.getLowHighLevels(area.monsterIDs)
result = result..'||'..highLvl
result = result..'||data-sort-value="' .. highLvl .. '"| ' .. Shared.formatnum(highLvl)
result = result..'||'..Areas._getAreaRequirements(area)
result = result..'||'..Areas._getAreaRequirements(area)
result = result..'|| '..Areas._getAreaStat(area, 'areaEffectDesc')
result = result..'|| '..Areas._getAreaStat(area, 'areaEffectDesc')
Line 142: Line 143:


result = result..'\r\n|-'
result = result..'\r\n|-'
result = result..'\r\n|data-sort-value="'..dung.name..'"|'..Icons.Icon({dung.name, type='dungeon', size='50', notext=true})
result = result..'\r\n|class="table-img" data-sort-value="'..dung.name..'"|'..Icons.Icon({dung.name, type='dungeon', size='50', notext=true})
result = result..'||'..Icons.Icon({dung.name, type='dungeon', noicon=true})
result = result..'||' .. Icons.getExpansionIcon(dung.id) .. Icons.Icon({dung.name, type='dungeon', noicon=true})
result = result..'||data-sort-value="'..dung.difficulty[1]..'"|'..Areas._getAreaStat(dung, 'difficulty')
result = result..'||data-sort-value="'..dung.difficulty[1]..'"|'..Areas._getAreaStat(dung, 'difficulty')
result = result..'||'..monsterCount
result = result..'||'..monsterCount