Anonymous

Module:SkillNav: Difference between revisions

From Elwiki
no edit summary
No edit summary
No edit summary
Line 20: Line 20:
     if (not isForceNav) then
     if (not isForceNav) then
         skill_types = {
         skill_types = {
             [1] = {
             {
                 ['name'] = args.l_hyper, -- 'Hyper Active',
                 ['name'] = args.l_hyper, -- 'Hyper Active',
                 ['abbr'] = 'HA'
                 ['abbr'] = 'HA'
             },
             },
             [2] = {
             {
                 ['name'] = args.l_secret, -- 'Secret Art',
                 ['name'] = args.l_secret, -- 'Secret Art',
                 ['abbr'] = 'SeA'
                 ['abbr'] = 'SeA'
             },
             },
             [3] = {
             {
                 ['name'] = args.l_special, -- 'Special Active',
                 ['name'] = args.l_special, -- 'Special Active',
                 ['abbr'] = 'SA'
                 ['abbr'] = 'SA'
             },
             },
             [4] = {
             {
                 ['name'] = args.l_active, -- 'Active',
                 ['name'] = args.l_active, -- 'Active',
                 ['abbr'] = 'A'
                 ['abbr'] = 'A'
             },
             },
             [5] = {
             {
                 ['name'] = args.l_mod, -- 'Force Mod',
                 ['name'] = args.l_mod, -- 'Force Mod',
                 ['abbr'] = 'FC'
                 ['abbr'] = 'FC'
             },
             },
             [6] = {
             {
                 ['name'] = args.l_buff, -- 'Buff',
                 ['name'] = args.l_buff, -- 'Buff',
                 ['abbr'] = 'B'
                 ['abbr'] = 'B'
             },
             },
             [7] = {
             {
                 ['name'] = args.l_passive, -- 'Passive',
                 ['name'] = args.l_passive, -- 'Passive',
                 ['abbr'] = 'P'
                 ['abbr'] = 'P'
             },
             },
             [8] = {
             {
                 ['name'] = args.l_demon, -- 'Manic Demon',
                 ['name'] = args.l_demon, -- 'Manic Demon',
                 ['abbr'] = 'MD'
                 ['abbr'] = 'MD'
             },
             },
             [9] = {
             {
                 ['name'] = '[[File:ForceIcon.png|16px]] ' .. args.l_demon, -- 'Manic Demon',
                 ['name'] = '[[File:ForceIcon.png|16px]] ' .. args.l_demon, -- 'Manic Demon',
                 ['abbr'] = 'MDF'
                 ['abbr'] = 'MDF'
             },
             },
             [10] = {
             {
                 ['name'] = args.l_master, -- 'Master Skill',
                 ['name'] = args.l_master, -- 'Master Skill',
                 ['abbr'] = 'MS'
                 ['abbr'] = 'MS'
             },
             },
             [11] = {
             {
                 ['name'] = args.l_couple, -- 'Couple Skill',
                 ['name'] = args.l_couple, -- 'Couple Skill',
                 ['abbr'] = 'Wed'
                 ['abbr'] = 'Wed'
            },
            {
                ['name'] = args.l_row1, -- 'Row 1',
                ['abbr'] = 'row1'
            },
            {
                ['name'] = args.l_row2, -- 'Row 2',
                ['abbr'] = 'row2'
            },
            {
                ['name'] = args.l_row3, -- 'Row 3',
                ['abbr'] = 'row3'
            },
            {
                ['name'] = args.l_row4, -- 'Row 4',
                ['abbr'] = 'row4'
             }
             }
         }
         }
Line 68: Line 84:
         -- Force Nav called, change skill types
         -- Force Nav called, change skill types
         skill_types = {
         skill_types = {
             [1] = {
             {
                 ['name'] = args.l_force_active, -- 'Force Active',
                 ['name'] = args.l_force_active, -- 'Force Active',
                 ['abbr'] = 'FA3',
                 ['abbr'] = 'FA3',
                 ['type'] = 'third'
                 ['type'] = 'third'
             },
             },
             [2] = {
             {
                 ['name'] = args.l_force_passive, -- 'Force Passive',
                 ['name'] = args.l_force_passive, -- 'Force Passive',
                 ['abbr'] = 'FP3',
                 ['abbr'] = 'FP3',
                 ['type'] = 'third'
                 ['type'] = 'third'
             },
             },
             [3] = {
             {
                 ['name'] = args.l_force_active, -- 'Force Active',
                 ['name'] = args.l_force_active, -- 'Force Active',
                 ['abbr'] = 'FAM',
                 ['abbr'] = 'FAM',
                 ['type'] = 'master'
                 ['type'] = 'master'
             },
             },
             [4] = {
             {
                 ['name'] = args.l_force_passive, -- 'Force Passive',
                 ['name'] = args.l_force_passive, -- 'Force Passive',
                 ['abbr'] = 'FPM',
                 ['abbr'] = 'FPM',
Line 117: Line 133:
     -- Header
     -- Header
     local header = skill_nav:tag('div'):addClass('skill-nav-header');
     local header = skill_nav:tag('div'):addClass('skill-nav-header');
     local colors = frame:expandTemplate{
     local colors;
        title = 'ColorSel',
        args = {'Character', args.char}
    };
     if (args.color ~= nil) then
     if (args.color ~= nil) then
         colors = args.color;
         colors = args.color;
    else
        colors = frame:expandTemplate{
            title = 'ColorSel',
            args = {'Character', args.char}
        };
     end
     end


Line 133: Line 151:


     header:attr('style', 'background-color:' .. colors)
     header:attr('style', 'background-color:' .. colors)
     if (not isForceNav) then
     if (not (isForceNav and args.isGuild)) then
         header:wikitext(frame:expandTemplate{
         header:wikitext(frame:expandTemplate{
             title = 'Face',
             title = 'Face',