Module:Magic: Difference between revisions

Remove extra Superheat requirements into _getSpellRequirements()
(Added smithing requirement to Superheat spells)
(Remove extra Superheat requirements into _getSpellRequirements())
Line 169: Line 169:
table.insert(resultPart, reqStr)
table.insert(resultPart, reqStr)
end
end
end
-- Note the Smithing level requirement for Superheat spells
if spell.produces ~= nil and spell.produces == 'Bar' then
table.insert(resultPart, "Bar's " .. Icons._SkillRealmIcon('Smithing', 'melvorD:Melvor') .. ' Level')
end
end


Line 672: Line 677:
local spellBook = p.getSpellBookFromSpell(spell)
local spellBook = p.getSpellBookFromSpell(spell)
local row = html:tag('tr')
local row = html:tag('tr')
local reqText = ''
if string.find(spell.name, 'Superheat') ~= nil then
reqText = "<br>Bar's " .. Icons._SkillRealmIcon('Smithing', 'melvorD:Melvor') .. " Level"
end
row:tag('td'):wikitext(Icons.Icon({spell.name, type=spellBook.imgType, notext=true}))
row:tag('td'):wikitext(Icons.Icon({spell.name, type=spellBook.imgType, notext=true}))
:css('text-align', 'center')
:css('text-align', 'center')
Line 686: Line 687:
end
end


row:tag('td'):wikitext(p._getSpellRequirements(spell) .. reqText)
row:tag('td'):wikitext(p._getSpellRequirements(spell))
    :attr('data-sort-value', spell.level)
    :attr('data-sort-value', spell.level)
row:tag('td'):wikitext(Icons.getDLCColumnIcon(spell.id))
row:tag('td'):wikitext(Icons.getDLCColumnIcon(spell.id))