Module:InfoboxCharacter: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(8 intermediate revisions by one other user not shown)
Line 9: Line 9:
     local infobox = require('Module:InfoboxProto').main(frame, args.class);
     local infobox = require('Module:InfoboxProto').main(frame, args.class);
     infobox:addClass('infobox-character');
     infobox:addClass('infobox-character');
    if (args.name1 == nil and args.name2 == nil) then
        addField('name', args.l_name);
    end


     local fields = {
     local fields = {
Line 33: Line 29:
             id = 'weapon',
             id = 'weapon',
             localize = args.l_weapon,
             localize = args.l_weapon,
            dual = true
        },
        {
            id = 'ability',
            localize = args.l_ability,
             dual = true
             dual = true
         },
         },
Line 72: Line 73:
             id = 'tree',
             id = 'tree',
             localize = args.l_tree
             localize = args.l_tree
        },
        {
            id = 'groups',
            localize = args.l_groups,
            collapsed = true,
            dual = true
         },
         },
         {
         {
Line 96: Line 103:
         {
         {
             id = 'theme',
             id = 'theme',
             localize = args.l_theme,
             localize = args.l_theme
            collapsed = true
         },
         },
         {
         {
Line 109: Line 115:
     }
     }


     for k, v in ipairs(fields) do
     addFields(fields);
        if v.special then
            addField2(v.id, v.localize)
        else
            addField(v.id, v.localize, v.dual, v.collapsed)
        end
    end
      
      
     return tostring(infobox);
     return tostring(infobox);
ElEditors, Administrators
96,465

edits