Module:Infobox Item: Difference between revisions

Jump to navigation Jump to search
130 bytes added ,  10:32, 1 April 2022
no edit summary
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
--[[
local a1 = ret:param('all')
if onmain() then
local a2 = ret:categoryData()
local a1 = ret:param('all')
ret:wikitext(addcategories(a1, a2))
local a2 = ret:categoryData()
end
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
-- ret[i] = string.format('[[Category:%s]]', v)
--[[ end


return table.concat(ret, '')
return table.concat(ret, '')
end
end
]]


return p
return p

Navigation menu