Module:InfoboxCharacter: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(5 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 76: Line 77:
             id = 'groups',
             id = 'groups',
             localize = args.l_groups,
             localize = args.l_groups,
             collapsed = true
             collapsed = true,
            dual = true
         },
         },
         {
         {
Line 113: 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,584

edits