Module:InfoboxSE
From Elwiki
Documentation for this module may be created at Module:InfoboxSE/doc
require('Module:CommonFunctions')
local getArgs = require('Module:Arguments').getArgs
local p = {}
-- Main process
function p.main(frame)
local args = getArgs(frame);
local status_type = '';
if args['Buff'] == nil then
status_type = 'Debuff';
else
status_type = 'Buff';
end
local max_stacks = 1;
if args['MaxStack'] ~= nil then
max_stacks = args['MaxStacks'];
end
local infobox = require('Module:InfoboxProto').main(frame, args['Name']);
infobox:addClass('infobox-status');
addField('Name', 'Debuff Name');
addField('Buff', 'Status Type', nil, status_type);
addField('Icon');
addField('MaxStack', 'Max Stacks', nil, max_stacks);
return tostring(infobox) .. '[[Category: Status Effects]][[Category: ' .. status_type .. 's]]';
end
return p