Template:Infobox Monster: Difference between revisions

From OtherX
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 1: Line 1:
<includeonly>
-- Module for Template:Infobox Monster
{{#invoke:Infobox Monster|main
 
|name = {{{name|}}}
local p = {}
|image = {{{image|}}}
 
|release = {{{release|}}}
local infobox = require('Module:Infobox')
|update = {{{update|}}}
local commas = require('Module:Addcommas')._add
|also called = {{{also called|}}}
 
|enviro tiers = {{{enviro tiers|}}}
function p.main(frame)
|boss number = {{{boss number|}}}
    local args = frame:getParent().args
|members = {{{members|}}}
 
|combat = {{{combat|}}}
    local ret = infobox.new(args)
|examine = {{{examine|}}}
 
|max hit = {{{max hit|}}}
    ret:defineParams{
|aggressive = {{{aggressive|}}}
        'name',
|poisonous = {{{poisonous|}}}
        'image',
|hp stats = {{{hp stats|}}}
        'release',
|immunepoison = {{{immunepoison|}}}
        'update',
|immunevenom = {{{immunevenom|}}}
        'also called',
|id = {{{id|}}}
        'enviro tiers',
}}
        'boss number',
</includeonly>
        '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