Editing Module:TalentList
From Eco - English Wiki
Your changes will be displayed to readers once an authorized user accepts them. (help)
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
-- Credit: Original SkillList was created by Fyre (FishAus) then edited by Scotty (ZeelNightwolf) and used as a base for | -- Credit: Original SkillList was created by Fyre (FishAus) then edited by Scotty (ZeelNightwolf) and used as a base for tagsList. | ||
local p = {} | local p = {} | ||
Line 32: | Line 32: | ||
-- load lists | -- load lists | ||
local | local itemData = require( "Module:ItemData" ) | ||
local | local tagList = '' | ||
--Check Passes | --Check Passes | ||
if list ~= ' | if list ~= 'tags' then | ||
return | return tagsList .. ' Incorrect use of pass. ' | ||
end | end | ||
local a = {} | local a = {} | ||
--Talent List | --Talent List | ||
if list == ' | if list == 'tags' then | ||
tagsList = tagsList .. '=== Tags List ===\n' | |||
tagsList = tagsList .. '<div style=\"column-count:3;-moz-column-count:3;-webkit-column-count:3\">\n' | |||
for k,v in pairs( | for k,v in pairs(itemData.tags) do | ||
if | if itemData.tags[k] ~= nil or itemData.tags[k] ~= '' then | ||
table.insert(a,k) | table.insert(a,k) | ||
end | end | ||
Line 53: | Line 53: | ||
table.sort(a) | table.sort(a) | ||
for i,n in ipairs(a) do | for i,n in ipairs(a) do | ||
tagsList = tagsList .. '* [[' .. n .. ']]\n' | |||
end | end | ||
tagsList = tagsList .. '</div>' | |||
end | end | ||
return | return tagsList | ||
end | end | ||
return p | return p |