Module:ItemsByStat: Difference between revisionsGive feedback
SerpentofSet (talk | contribs) No edit summary |
SerpentofSet (talk | contribs) mNo edit summary |
||
| Line 23: | Line 23: | ||
local colorBySlot = {} | local colorBySlot = {} | ||
colorBySlot["Weapon"] = "# | colorBySlot["Weapon"] = "#FCAC4D" | ||
colorBySlot[" | colorBySlot["Armor"] = "#86C921" | ||
colorBySlot[" | colorBySlot["Tech"] = "#DE9CFF" | ||
p.tablefy = function(frame) | p.tablefy = function(frame) | ||
| Line 32: | Line 32: | ||
local outString = '{| class="wikitable sortable"\n|-\n!Item!!Tier!!Cost!!Slot!!Value\n' | local outString = '{| class="wikitable sortable"\n|-\n!Item!!Tier!!Cost!!Slot!!Value\n' | ||
for i=1,#tableData[1] do | for i=1,#tableData[1] do | ||
outString = outString..'|-style="background: | outString = outString..'|-style="background: '..colorBySlot[tableData[4][i]]..'"\n|{{ItemIcon|'..tableData[1][i].."}}||"..tableData[2][i].."||"..tableData[3][i].."||"..tableData[5][i].."\n" | ||
end | end | ||
return outString.."|}" | return outString.."|}" | ||