Module:SkillTable: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 49: Line 49:
         local mod_subpage = ''
         local mod_subpage = ''
         local cube = ''
         local cube = ''
        local prefix = ''
        local suffix = ''


         -- Locked skills
         -- Locked skills
Line 136: Line 138:
                 full_name = full_name:gsub('/Mod', '');
                 full_name = full_name:gsub('/Mod', '');
                 mod_subpage = l_mod_subpage
                 mod_subpage = l_mod_subpage
            end
            -- Prefixes and suffixes
            if (full_name:match('++') or full_name:match('##')) then
                prefix = trim(full_name:match('^(.*)%+%+')) .. ' ';
                full_name = trim(full_name:gsub('^.*%+%+', ''));
            end
            if (full_name:match('##')) then
                suffix = ' ' .. trim(full_name:match('##(.*)$'));
                full_name = trim(full_name:gsub('##.*$', ''));
             end
             end


Line 148: Line 161:
             end
             end
              
              
             skill_wrap:tag('div'):addClass('skill-wrap-text'):wikitext('[[' .. full_name .. mod_subpage .. '|' .. display_name .. ']] ' .. lock .. cube );
             skill_wrap:tag('div'):addClass('skill-wrap-text'):wikitext('[[' .. full_name .. mod_subpage .. '|' .. prefix .. display_name .. ']] ' .. suffix .. lock .. cube );
              
              
             -- If a header is detected, it will not interrupt chunking.
             -- If a header is detected, it will not interrupt chunking.