Anonymous

Module:CombatAreas/AreaTables: Difference between revisions

From Melvor Idle
getCombatAreaTable: Add Requirements column
(getCombatAreaTable: Fix area icons)
(getCombatAreaTable: Add Requirements column)
Line 27: Line 27:
local result = '{| class="wikitable sortable stickyHeader"'
local result = '{| class="wikitable sortable stickyHeader"'
result = result..'\r\n|- class="headerRow-0"'
result = result..'\r\n|- class="headerRow-0"'
result = result..'\r\n!colspan="2"|Zone!!Difficulty!!Lowest Monster Level!!Highest Monster Level'
result = result..'\r\n!colspan="2"|Zone!!Difficulty!!Lowest Monster Level!!Highest Monster Level!!Requirements'


local areas = GameData.sortByOrderTable(GameData.rawData.combatAreas, GameData.rawData.combatAreaDisplayOrder)
local areas = GameData.sortByOrderTable(GameData.rawData.combatAreas, GameData.rawData.combatAreaDisplayOrder)
Line 38: Line 38:
result = result .. '||data-sort-value="' .. lowLvl .. '"| ' .. Shared.formatnum(lowLvl)
result = result .. '||data-sort-value="' .. lowLvl .. '"| ' .. Shared.formatnum(lowLvl)
result = result .. '||data-sort-value="' .. highLvl .. '"| ' .. Shared.formatnum(highLvl)
result = result .. '||data-sort-value="' .. highLvl .. '"| ' .. Shared.formatnum(highLvl)
local reqText = Areas._getAreaRequirements(area)
if reqText == nil or reqText == '' then
result = result .. '||class="table-na"| None'
else
result = result .. '||' .. reqText
end
end
end
result = result..'\r\n|}'
result = result..'\r\n|}'