73
edits
No edit summary |
No edit summary |
||
Line 1,099: | Line 1,099: | ||
end | end | ||
function p._prepareGearSet(gearSet) | function p._prepareGearSet(gearSet, entity) | ||
local icons = '' | local icons = '' | ||
for i, | |||
for i, itemName in ipairs(gearSet.entities) do | |||
-- Skip trimmed armor, which always starts with an open parnthesis | -- Skip trimmed armor, which always starts with an open parnthesis | ||
if string.sub( | if string.sub(itemName, 1, 1) ~= '(' then | ||
icons = icons .. Icons.Icon({ | icons = icons .. Icons.Icon({itemName, type='item', notext=true}) | ||
end | end | ||
end | end | ||
return gearSet.verb .. ' ' .. icons .. ' ' .. gearSet.name | -- Get extra requirements for whicheve piece we processed first, as they | ||
-- should all be the same | |||
local extraReqs = p._prepareOtherReqs(entity) | |||
return gearSet.verb .. ' ' .. icons .. ' ' .. gearSet.name .. extraReqs | |||
end | end | ||
Line 1,181: | Line 1,186: | ||
local toInsert = '' | local toInsert = '' | ||
if entityGearSet ~= nil then | if entityGearSet ~= nil then | ||
toInsert = p._prepareGearSet(entityGearSet) | toInsert = p._prepareGearSet(entityGearSet, entity) | ||
table.insert(processedSets, entityGearSet.name) | table.insert(processedSets, entityGearSet.name) | ||
else | else |
edits