4,951
edits
Falterfire (talk | contribs) (Fixed a slight formatting error) |
Falterfire (talk | contribs) (Tweaked formatting on getCostString) |
||
Line 17: | Line 17: | ||
table.insert(costArray, Icons.SC(cost.slayerCoins)) | table.insert(costArray, Icons.SC(cost.slayerCoins)) | ||
end | end | ||
local itemArray = {} | |||
if cost.items ~= nil then | if cost.items ~= nil then | ||
for i, itemCost in Shared.skpairs(cost.items) do | for i, itemCost in Shared.skpairs(cost.items) do | ||
local item = Items.getItemByID(itemCost[1]) | local item = Items.getItemByID(itemCost[1]) | ||
table.insert( | table.insert(itemArray, Icons.Icon({item.name, type="item", notext=true, qty=itemCost[2]})) | ||
end | |||
if Shared.tableCount(itemArray) > 0 then | |||
table.insert(costArray, table.concat(itemArray, ", ")) | |||
end | end | ||
end | end | ||
return table.concat(costArray, " | return table.concat(costArray, "<br/>") | ||
end | end | ||