1,131
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
-------------------------- | -------------------------- | ||
-- Module for [[Template:Infobox Item]] | -- Module for [[Template:Infobox Item]] | ||
-- | |||
-- Todo: | |||
-- * Text on drop | |||
-- * Equipable | |||
-- * Automatic categories with semantic mediawiki | |||
-- | |||
------------------------ | ------------------------ | ||
local p = {} | local p = {} | ||
| Line 287: | Line 293: | ||
if onmain() then | --[[ | ||
if onmain() then | |||
local a1 = ret:param('all') | |||
local a2 = ret:categoryData() | |||
ret:wikitext(addcategories(a1, a2)) | |||
end | |||
]] | |||
ret:finish() | ret:finish() | ||
| Line 298: | Line 306: | ||
end | end | ||
--[[ | |||
function addcategories(args, catargs) | function addcategories(args, catargs) | ||
local ret = { 'Items' } | local ret = { 'Items' } | ||
| Line 380: | Line 389: | ||
-- combine table and format category wikicode | -- combine table and format category wikicode | ||
for i, v in ipairs(ret) do | for i, v in ipairs(ret) do | ||
]] | |||
-- ret[i] = string.format('[[Category:%s]]', v) | |||
--[[ end | |||
return table.concat(ret, '') | return table.concat(ret, '') | ||
end | end | ||
]] | |||
return p | return p | ||