239
edits
(getItemGrid: Amend to use new CSS class rather than per-cell styles) |
(Add blocked/occupied slot) |
||
Line 497: | Line 497: | ||
["Gem"] = "Gems_(Equipment)" | ["Gem"] = "Gems_(Equipment)" | ||
} | } | ||
local slotText = {} | function getSlotText(slotList) | ||
local slotText = {} | |||
for i, slot in ipairs(slotList) do | |||
local slotLink = slotLinkMap[slot] | |||
if slotLink == nil then | |||
table.insert(slotText, slot) | |||
else | |||
table.insert(slotText, '[[' .. slotLink .. '|' .. slot .. ']]') | |||
end | |||
if slot == 'Passive' then | |||
isPassive = true | |||
end | |||
end | end | ||
return slotText | |||
end | end | ||
slotText = getSlotText(item.validSlots) | |||
table.insert(resultPart, "\r\n|-\r\n|'''Equipment Slot:''' "..table.concat(slotText, ', ')) | table.insert(resultPart, "\r\n|-\r\n|'''Equipment Slot:''' "..table.concat(slotText, ', ')) | ||
if item.occupiesSlots ~= nil then | |||
slotText = getSlotText(item.occupiesSlots) | |||
table.insert(resultPart, "\r\n|-\r\n|'''Blocked Slot:''' "..table.concat(slotText, ', ')) | |||
end | |||
end | end | ||
--For weapons with a special attack, show the details | --For weapons with a special attack, show the details |
edits