Module:Infobox Monster: Difference between revisions
Jump to navigation
Jump to search
OtherXAdmin (talk | contribs) No edit summary Tag: Reverted |
OtherXAdmin (talk | contribs) No edit summary Tag: Reverted |
||
Line 41: | Line 41: | ||
-- Generate the infobox | -- Generate the infobox | ||
ret:create() | local infoboxCode = ret:create() | ||
return | return infoboxCode | ||
end | end | ||
return p | return p |
Revision as of 18:50, 21 January 2024
Module documentation
This documentation is transcluded from Module:Infobox Monster/doc. [edit] [history] [purge]
Module:Infobox Monster requires Module:Infobox.
-- Module for Template:Infobox Monster local p = {} local infobox = require('Module:Infobox') function p.main(frame) local args = frame:getParent().args local ret = infobox.new(args) -- Define the parameters that the infobox will use ret:defineParams{ 'name', 'image', 'release', 'update', 'also called', 'enviro tiers', 'boss number', 'members', 'combat', 'examine', 'max hit', 'aggressive', 'poisonous', 'hp stats', 'immunepoison', 'immunevenom', 'id' } -- Add the rows to the infobox ret:addRow{ { tag = 'argd', content = 'name', class='infobox-header' } } ret:addRow{ { tag = 'argd', content = 'image', class='infobox-image' } } ret:addRow{ { tag = 'argd', content = 'release', class='infobox-release' } } -- Continue adding rows for each parameter as needed... -- Process and clean up the parameters ret:cleanParams() -- Generate the infobox local infoboxCode = ret:create() return infoboxCode end return p