Template: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 1: | Line 1: | ||
-- Module for Template:Infobox Monster | |||
{ | |||
local p = {} | |||
local infobox = require('Module:Infobox') | |||
local commas = require('Module:Addcommas')._add | |||
function p.main(frame) | |||
local args = frame:getParent().args | |||
local ret = infobox.new(args) | |||
ret:defineParams{ | |||
'name', | |||
'image', | |||
'release', | |||
'update', | |||
'also called', | |||
'enviro tiers', | |||
'boss number', | |||
'members', | |||
'combat', | |||
'examine', | |||
'max hit', | |||
'aggressive', | |||
'poisonous', | |||
'hp stats', | |||
'immunepoison', | |||
'immunevenom', | |||
'id' | |||
} | |||
ret:defineLinks({ hide = true }) | |||
ret:create() | |||
ret:cleanParams() | |||
ret:addButtonsCaption() | |||
ret:defineName('Infobox Monster') | |||
ret:addClass('infobox-monster') | |||
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' } } | |||
ret:addRow{ { tag = 'argd', content = 'also called', class='infobox-aka' } } | |||
ret:addRow{ { tag = 'argd', content = 'enviro tiers', class='infobox-enviro-tiers' } } | |||
ret:addRow{ { tag = 'argd', content = 'boss number', class='infobox-boss-number' } } | |||
ret:addRow{ { tag = 'argd', content = 'members', class='infobox-members' } } | |||
ret:addRow{ { tag = 'argd', content = 'combat', class='infobox-combat' } } | |||
ret:addRow{ { tag = 'argd', content = 'examine', class='infobox-examine' } } | |||
ret:addRow{ { tag = 'argd', content = 'max hit', class='infobox-max-hit' } } | |||
ret:addRow{ { tag = 'argd', content = 'aggressive', class='infobox-aggressive' } } | |||
ret:addRow{ { tag = 'argd', content = 'poisonous', class='infobox-poisonous' } } | |||
ret:addRow{ { tag = 'argd', content = 'hp stats', class='infobox-hp-stats' } } | |||
ret:addRow{ { tag = 'argd', content = 'immunepoison', class='infobox-immunepoison' } } | |||
ret:addRow{ { tag = 'argd', content = 'immunevenom', class='infobox-immunevenom' } } | |||
ret:addRow{ { tag = 'argd', content = 'id', class='infobox-id' } } | |||
return ret:tostring() | |||
end | |||
return p |
Revision as of 21:14, 21 January 2024
-- Module for Template:Infobox Monster
local p = {}
local infobox = require('Module:Infobox') local commas = require('Module:Addcommas')._add
function p.main(frame)
local args = frame:getParent().args
local ret = infobox.new(args)
ret:defineParams{ 'name', 'image', 'release', 'update', 'also called', 'enviro tiers', 'boss number', 'members', 'combat', 'examine', 'max hit', 'aggressive', 'poisonous', 'hp stats', 'immunepoison', 'immunevenom', 'id' }
ret:defineLinks({ hide = true })
ret:create() ret:cleanParams()
ret:addButtonsCaption()
ret:defineName('Infobox Monster') ret:addClass('infobox-monster')
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' } } ret:addRow{ { tag = 'argd', content = 'also called', class='infobox-aka' } } ret:addRow{ { tag = 'argd', content = 'enviro tiers', class='infobox-enviro-tiers' } } ret:addRow{ { tag = 'argd', content = 'boss number', class='infobox-boss-number' } } ret:addRow{ { tag = 'argd', content = 'members', class='infobox-members' } } ret:addRow{ { tag = 'argd', content = 'combat', class='infobox-combat' } } ret:addRow{ { tag = 'argd', content = 'examine', class='infobox-examine' } } ret:addRow{ { tag = 'argd', content = 'max hit', class='infobox-max-hit' } } ret:addRow{ { tag = 'argd', content = 'aggressive', class='infobox-aggressive' } } ret:addRow{ { tag = 'argd', content = 'poisonous', class='infobox-poisonous' } } ret:addRow{ { tag = 'argd', content = 'hp stats', class='infobox-hp-stats' } } ret:addRow{ { tag = 'argd', content = 'immunepoison', class='infobox-immunepoison' } } ret:addRow{ { tag = 'argd', content = 'immunevenom', class='infobox-immunevenom' } } ret:addRow{ { tag = 'argd', content = 'id', class='infobox-id' } }
return ret:tostring()
end
return p