Module:Traits: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 95: Line 95:
     end
     end


    Tr = {}
     function newtr()
     function Tr:new()
         return trait_table:tag('tr'):css('background-color', color())
         return trait_table:tag('tr'):css('background-color', color())
     end
     end


     -- Spawn headers
     -- Spawn headers
     local thead = Tr:new()
     local thead = newtr()
     thead:tag('th'):attr('colspan', counts[1]):wikitext(traits[1] .. ' ' .. skill)
     thead:tag('th'):attr('colspan', counts[1]):wikitext(traits[1] .. ' ' .. skill)
     thead:tag('th'):attr('colspan', counts[2]):wikitext(traits[2] .. ' ' .. skill)
     thead:tag('th'):attr('colspan', counts[2]):wikitext(traits[2] .. ' ' .. skill)


     local tr_2 = Tr:new();
     local tr_2 = newtr();
     for i = 1, 2, 1 do
     for i = 1, 2, 1 do
         tr_2:tag('th'):wikitext('Attribute Effect')
         tr_2:tag('th'):wikitext('Attribute Effect')