Module:InfoboxPet: Difference between revisions
From Elwiki
m (Ritsu moved page Module:Petbox to Module:InfoboxPet without leaving a redirect) |
No edit summary |
||
Line 13: | Line 13: | ||
local infobox = require('Module:InfoboxProto').main(frame, title); | local infobox = require('Module:InfoboxProto').main(frame, title); | ||
infobox:addClass('infobox- | infobox:addClass('infobox-pet'); | ||
addField('name'); | addField('name'); |
Revision as of 19:01, 17 May 2022
Documentation for this module may be created at Module:InfoboxPet/doc
require('Module:CommonFunctions')
local getArgs = require('Module:Arguments').getArgs
local p = {}
-- Main process
function p.main(frame)
local args = getArgs(frame);
if args['Icon'] == nil then
args['Icon'] = frame:preprocess('[[File:Dunno.png|48px]]');
end
local title = args['Icon'] .. ' ' .. args['Name'];
local infobox = require('Module:InfoboxProto').main(frame, title);
infobox:addClass('infobox-pet');
addField('name');
addField('Starting Form');
addField('Inventory', 'Pet Inventory Size');
addField('Trait');
addField('Commands', 'Special Commands');
return tostring(infobox) .. '[[Category: Pets]]';
end
return p