17,101
edits
Falterfire (talk | contribs) m (pickocket -> pickpocket) |
(getFishTable: Adjust formatting) |
||
Line 330: | Line 330: | ||
local GPs = fish.sellsFor / timeSortVal | local GPs = fish.sellsFor / timeSortVal | ||
local cookSortVal = cookReq[recipe.productId] or 0 | local cookSortVal = cookReq[recipe.productId] or 0 | ||
local cookClass = (cookReq[recipe.productId] ~= nil and '' or 'class="table-na" ') | |||
local cookStr = cookReq[recipe.productId] or 'N/A' | local cookStr = cookReq[recipe.productId] or 'N/A' | ||
table.insert(resultPart, '\r\n|-') | table.insert(resultPart, '\r\n|-') | ||
table.insert(resultPart, '\r\n| | table.insert(resultPart, '\r\n|class="table-img"| ' .. Icons.Icon({fish.name, type='item', size='50', notext=true})) | ||
table.insert(resultPart, '\r\n| ' .. Icons.Icon({fish.name, type='item', noicon=true})) | table.insert(resultPart, '\r\n| ' .. Icons.Icon({fish.name, type='item', noicon=true})) | ||
table.insert(resultPart, '\r\n|style="text-align:right"| ' .. recipe.level) | table.insert(resultPart, '\r\n|style="text-align:right"| ' .. recipe.level) | ||
table.insert(resultPart, '\r\n|style="text-align:right" data-sort-value="' .. timeSortVal .. '"| ' .. timeStr) | table.insert(resultPart, '\r\n|style="text-align:right" data-sort-value="' .. timeSortVal .. '"| ' .. timeStr) | ||
table.insert(resultPart, '\r\n|style="text-align:right"| ' .. recipe.baseExperience) | table.insert(resultPart, '\r\n|style="text-align:right" data-sort-value="' .. recipe.baseExperience .. '"| ' .. Shared.formatnum(recipe.baseExperience)) | ||
table.insert(resultPart, '\r\n|data-sort-value="' .. fish.sellsFor .. '"| ' .. Icons.GP(fish.sellsFor)) | table.insert(resultPart, '\r\n|data-sort-value="' .. fish.sellsFor .. '"| ' .. Icons.GP(fish.sellsFor)) | ||
table.insert(resultPart, '\r\n|style="text-align:right"| ' .. Shared.round(XPs, 2, 2)) | table.insert(resultPart, '\r\n|style="text-align:right"| ' .. Shared.round(XPs, 2, 2)) | ||
table.insert(resultPart, '\r\n|data-sort-value="' .. GPs .. '"|' .. Icons.GP(Shared.round(GPs, 2, 2))) | table.insert(resultPart, '\r\n|data-sort-value="' .. GPs .. '"|' .. Icons.GP(Shared.round(GPs, 2, 2))) | ||
table.insert(resultPart, '\r\n|style="text-align:right" data-sort-value="' .. cookSortVal .. '"| ' .. cookStr) | table.insert(resultPart, '\r\n|' .. cookClass .. 'style="text-align:right" data-sort-value="' .. cookSortVal .. '"| ' .. cookStr) | ||
end | end | ||
end | end |