Module:Infobox NPC: Difference between revisions

Adding actions.
(Created page with "local p = {} local Infobox = require('Module:Infobox') local parse = require('Module:Param Parse') function p.main(frame) local args = frame:getParent().args local config = { infobox_name = 'Item', } local params = { parse.name, parse.image, parse.release, parse.premium, parse.episode, parse.profession, {name = 'shop', func = parse.has_content, smw_property = 'Shop'}, -- TODO - move to Module:Param Parse once more details are available, and crea...")
 
(Adding actions.)
 
(12 intermediate revisions by 5 users not shown)
Line 8:
local config = {
infobox_name = 'ItemNPC',
class = {Infobox.smw_param('episode')},
}
local params = {
parse.professionactions,
parse.name,
parse.image,
Line 17 ⟶ 19:
parse.premium,
parse.episode,
parse.profession,
{name = 'shop', func = parse.has_content, smw_property = 'Shop'}, -- TODO - move to Module:Param Parse once more details are available, and create property page
parse.description,
}
Line 40 ⟶ 42:
{tag='th', content='[[Premium Pass|Premium]]', colspan="6"},
{tag='td', content=Infobox.param('premium'), colspan="14"},
}
:add_row{
{tag='th', content='[[Profession]]', colspan="6"},
{tag='td', content=Infobox.param('profession'), colspan="14"},
}
if infobox:is_param_defined(Infobox.param('shop')) > 0 then
infobox:add_row{
{tag='tdth', content='[[Shop]]', colspan="6"},
{tag='td', content=Infobox.param('shop'), colspan="14"},
}
end
infobox:pad(20)add_row{
{tag='th', content='[[Profession]]Actions', colspan="6"},
{tag='td', content=Infobox.param('professionactions'), colspan="14"},
}
infobox:add_row{
{tag='th', content='Description', colspan="6"},
{tag='td', content=Infobox.param('description'), colspan="14"}
}
:pad(20)
return infobox
809

edits