Anonymous

Module:Skills/Gathering: Difference between revisions

From Melvor Idle
getFishTable: Tweak formatting further
(getFishTable: Adjust formatting)
(getFishTable: Tweak formatting further)
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 cookStyle = (cookReq[recipe.productId] ~= nil and 'style="text-align:right" ' 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|-')
Line 341: Line 341:
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|' .. cookClass .. 'style="text-align:right" data-sort-value="' .. cookSortVal .. '"| ' .. cookStr)
table.insert(resultPart, '\r\n|' .. cookStyle .. 'data-sort-value="' .. cookSortVal .. '"| ' .. cookStr)
end
end
end
end