Jump to content

📢 Please make sure to read our Style Guide before editing. For questions, suggestions, or technical issues, please contact Noah.

Module:Infobox Player: Difference between revisions

From CrabCraft Wiki
m refixed season joined
Tag: Manual revert
added more fields
Line 11: Line 11:
     {'t', args.username},
     {'t', args.username},
     {'s', 'About'},
     {'s', 'About'},
     {'f', 'nationality', args.nationality},
     {'f', 'Nationality', args.nationality},
     {'f', 'seasonjoined', args.seasonjoined},
     {'f', 'Season Joined', args.seasonjoined},
    {'f', 'Quote', args.quote},
     {'s', 'Socials'},
     {'s', 'Socials'},
     {'f', 'discord', args.discord},
     {'f', 'Alias', args.alias},
    {'f', 'Discord', args.discord},
    {'s', 'Government'},
    {'f', 'Minister Role', args.ministerrole},
    {'f', 'Assumed Office', args.assumedoffice},
    {'f', 'Preceded By', args.precededby},
    {'s', 'Favourite:'},
    {'f', 'Item', args.favouriteitem},
    {'f', 'Block', args.favouriteblock},
     }
     }



Revision as of 20:36, 21 June 2025

Documentation for this module may be created at Module:Infobox Player/doc

local p = {}

local infobox = require("Module:Infobox")

function p.infobox(frame)
    local args = frame:getParent().args
    local used = {} -- track which keys we’ve output
    local out = {}
    
    local player_args = {
    	{'t', args.username},
    	{'s', 'About'},
    	{'f', 'Nationality', args.nationality},
    	{'f', 'Season Joined', args.seasonjoined},
    	{'f', 'Quote', args.quote},
    	{'s', 'Socials'},
    	{'f', 'Alias', args.alias},
    	{'f', 'Discord', args.discord},
    	{'s', 'Government'},
    	{'f', 'Minister Role', args.ministerrole},
    	{'f', 'Assumed Office', args.assumedoffice},
    	{'f', 'Preceded By', args.precededby},
    	{'s', 'Favourite:'},
    	{'f', 'Item', args.favouriteitem},
    	{'f', 'Block', args.favouriteblock},
    }

    return infobox.infobox {
    	getParent = function() return { args = player_args } end
    }
end

return p