Anonymous

Module:Magic: Difference between revisions

From Melvor Idle
no edit summary
m (Correct type key)
No edit summary
Line 134: Line 134:


function p._getSpellIcon(spell, size)
function p._getSpellIcon(spell, size)
if size == nil then size = 50 end
local imgType = p._getSpellIconType(spell)
local imgType = p._getSpellIconType(spell)
return Icons.Icon({spell.name, type=imgType, notext=true, size=size})
return Icons.Icon({spell.name, type=imgType, notext=true})
end
end


Line 604: Line 603:
end
end
table.insert(resultPart, 'Requirements')
table.insert(resultPart, 'Requirements')
table.insert(resultPart, '[[DLC]]')
if includeDamage then
if includeDamage then
table.insert(resultPart, 'Spell Dmg')
table.insert(resultPart, 'Spell Dmg')
Line 621: Line 621:
local spellBook = p.getSpellBookFromSpell(spell)
local spellBook = p.getSpellBookFromSpell(spell)
local rowPart = {'\n|-\n|data-sort-value="' .. spell.name .. '"| '}
local rowPart = {'\n|-\n|data-sort-value="' .. spell.name .. '"| '}
table.insert(rowPart, Icons.Icon({spell.name, type=spellBook.imgType, notext=true, size=50}))
table.insert(rowPart, Icons.Icon({spell.name, type=spellBook.imgType, notext=true}))
table.insert(rowPart, '|| ' .. Icons.getExpansionIcon(spell.id) .. Icons.Icon({spell.name, type=spellBook.imgType, noicon=true}))
table.insert(rowPart, '|| [['  .. spell.name .. ']]')
table.insert(rowPart, '|| style="text-align: center;" | data-sort-value="' .. Icons.getExpansionID(spell.id) .. '" | ' .. Icons.getDLCColumnIcon(spell.id))
if includeTypeColumn then
if includeTypeColumn then
table.insert(rowPart, '||data-sort-value="' .. spellBook.id .. '"| ' .. p.getSpellTypeLink(spellBook.id))
table.insert(rowPart, '||data-sort-value="' .. spellBook.id .. '"| ' .. p.getSpellTypeLink(spellBook.id))
2,875

edits