Editing Module:Infobox Monster
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 3: | Line 3: | ||
local Infobox = require('Module:Infobox') |
local Infobox = require('Module:Infobox') |
||
local parse = require('Module:Param Parse') |
local parse = require('Module:Param Parse') |
||
local classMap = { |
|||
['hopeport'] = 'hopeport', |
|||
['hopeforest'] = 'hopeforest', |
|||
['mine of mantuban'] = 'mantuban', |
|||
['crenopolis'] = 'crenopolis', |
|||
} |
|||
function p.main(frame) |
function p.main(frame) |
||
Line 9: | Line 16: | ||
local config = { |
local config = { |
||
infobox_name = 'Monster', |
infobox_name = 'Monster', |
||
class = {Infobox.smw_param('episode')}, |
|||
} |
} |
||
local params = { |
local params = { |
||
parse.name, |
parse.name, |
||
parse. |
parse.image, |
||
parse.release, |
parse.release, |
||
parse.premium, |
parse.premium, |
||
Line 71: | Line 77: | ||
} |
} |
||
:pad(20) |
:pad(20) |
||
local ep_param = string.lower(infobox.args_raw['episode'] or '') |
|||
if classMap[ep_param] ~= nil then |
|||
infobox:addClass('infobox-'..classMap[ep_param]) |
|||
end |
|||
return infobox |
return infobox |