1,300
edits
(Created page with "-------------------------- -- Module for Template:Infobox NPC ------------------------ local p = {} local onmain = require('Module:Mainonly').on_main local paramtest = require('Module:Paramtest') local infobox = require('Module:Infobox') function p.main(frame) local args = frame:getParent().args local ret = infobox.new(args) ret:defineParams{ { name = 'name', func = 'name' }, { name = 'image', func = 'image' }, { name = 'image_smw', func = { name = image_...") |
No edit summary |
||
Line 20: | Line 20: | ||
{ name = 'aka', func = 'has_content' }, | { name = 'aka', func = 'has_content' }, | ||
{ name = 'level', func = 'has_content' }, | { name = 'level', func = 'has_content' }, | ||
{ name = 'race', func = 'has_content' }, | { name = 'race', func = 'has_content' }, | ||
{ name = 'location', func = 'has_content' }, | { name = 'location', func = 'has_content' }, | ||
{ name = 'shop', func = 'has_content' }, | { name = 'shop', func = 'has_content' }, | ||
Line 42: | Line 40: | ||
id_smw = 'NPC ID', | id_smw = 'NPC ID', | ||
examine = 'Examine', | examine = 'Examine', | ||
location = 'NPC location', | location = 'NPC location', | ||
usesinfobox = 'Uses infobox', | usesinfobox = 'Uses infobox', | ||
Line 67: | Line 64: | ||
:pad(20) | :pad(20) | ||
:addRow{ | :addRow{qu | ||
{ tag = 'argd', content = 'image', colspan = '20', class = 'infobox-full-width-content' } | { tag = 'argd', content = 'image', colspan = '20', class = 'infobox-full-width-content' } | ||
} | } | ||
Line 97: | Line 94: | ||
} | } | ||
end | end | ||
if ret:paramDefined('race') then | if ret:paramDefined('race') then | ||
Line 119: | Line 111: | ||
{ tag = 'th', content = '[[Shop]]', colspan = '8' }, | { tag = 'th', content = '[[Shop]]', colspan = '8' }, | ||
{ tag = 'argd', content = 'shop', colspan = '12' } | { tag = 'argd', content = 'shop', colspan = '12' } | ||
} | } | ||
end | end | ||
Line 220: | Line 205: | ||
aka = 'Pages with AKA', | aka = 'Pages with AKA', | ||
shop = 'Merchants', | shop = 'Merchants', | ||
} | } | ||
for n, v in pairs(defined_args) do | for n, v in pairs(defined_args) do | ||
Line 231: | Line 215: | ||
local notdefined_args = { | local notdefined_args = { | ||
image = 'Needs image', | image = 'Needs image', | ||
release = 'Needs release date', | release = 'Needs release date', | ||
examine = 'Needs examine added', | examine = 'Needs examine added', |