Module:Infobox Monster: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(Cleaner to do it this way imo)
(let's see how this goes x2combo)
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 77: Line 70:
}
}
:pad(20)
:pad(20)
:set_episode_class(infobox.args_raw['episode'])
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