Module:MonsterVariantsTable: Difference between revisions

m
separate unlock profession
m (cleanup)
m (separate unlock profession)
Line 1:
require('Module:Mw.html extension')
local editbutton = require('Module:Edit button')
local p = {}
Line 22 ⟶ 23:
'?Name = name',
'?= page',
'?Unlock_level = unlockunlock_lvl',
'?Unlock profession # = unlock_profession',
'?Profession_Level_A = combat',
'?Profession A # = profession',
Line 61 ⟶ 63:
table.sort(data, function(a, b)
-- Determine combat values
local combatA = a.combat or a.unlockunlock_lvl or math.huge
local combatB = b.combat or b.unlockunlock_lvl or math.huge
-- Sort in ascending order
return combatA < combatB
Line 79 ⟶ 81:
:done()
:tag('td')
:IF(entry.unlock_lvl == 'N/A')
:wikitext(entry.unlock and p.formatProfessionLevel(entry.profession, entry.unlock) or edit)
:addClass('table-na')
:wikitext('N/A')
:ELSE()
:wikitext(entry.unlockunlock_lvl and p.formatProfessionLevel(entry.professionunlock_profession, entry.unlockunlock_lvl) or edit)
:END()
:done()
:tag('td')
7,248

edits