17,081
edits
Tag: Undo |
(getAutoEatTable: Fix modifier handling) |
||
Line 719: | Line 719: | ||
table.insert(resultPart, '!colspan="2"|Auto Eat Tier!!Minimum Threshold!!Efficiency!!Max Healing!!Cost') | table.insert(resultPart, '!colspan="2"|Auto Eat Tier!!Minimum Threshold!!Efficiency!!Max Healing!!Cost') | ||
-- Rows for each Auto Eat tier | -- Rows for each Auto Eat tier | ||
local mods = {[" | local mods = {["autoEatEfficiency"] = 0, ["autoEatHPLimit"] = 0, ["autoEatThreshold"] = 0} | ||
for i, purchase in ipairs(purchasesAE) do | for i, purchase in ipairs(purchasesAE) do | ||
local purchaseName = Common.getPurchaseName(purchase) | local purchaseName = Common.getPurchaseName(purchase) | ||
Line 731: | Line 731: | ||
table.insert(resultPart, '|-\r\n|class="table-img" data-sort-value="' .. purchaseName .. '"| ' .. Icons.Icon({purchaseName, type='upgrade', notext=true})) | table.insert(resultPart, '|-\r\n|class="table-img" data-sort-value="' .. purchaseName .. '"| ' .. Icons.Icon({purchaseName, type='upgrade', notext=true})) | ||
table.insert(resultPart, '| ' .. Icons.Icon({purchaseName, type='upgrade', noicon=true})) | table.insert(resultPart, '| ' .. Icons.Icon({purchaseName, type='upgrade', noicon=true})) | ||
table.insert(resultPart, '| style="text-align:right;" data-sort-value="' .. mods. | table.insert(resultPart, '| style="text-align:right;" data-sort-value="' .. mods.autoEatThreshold .. '" | ' .. Num.formatnum(Num.round(mods.autoEatThreshold, 0, 0)) .. '%') | ||
table.insert(resultPart, '| style="text-align:right;" data-sort-value="' .. mods. | table.insert(resultPart, '| style="text-align:right;" data-sort-value="' .. mods.autoEatEfficiency .. '" | ' .. Num.formatnum(Num.round(mods.autoEatEfficiency, 0, 0)) .. '%') | ||
table.insert(resultPart, '| style="text-align:right;" data-sort-value="' .. mods. | table.insert(resultPart, '| style="text-align:right;" data-sort-value="' .. mods.autoEatHPLimit .. '" | ' .. Num.formatnum(Num.round(mods.autoEatHPLimit, 0, 0)) .. '%') | ||
table.insert(resultPart, '| style="text-align:right;" data-sort-value="' .. p._getPurchaseSortValue(purchase) .. '" | ' .. p.getCostString(purchase.cost, false)) | table.insert(resultPart, '| style="text-align:right;" data-sort-value="' .. p._getPurchaseSortValue(purchase) .. '" | ' .. p.getCostString(purchase.cost, false)) | ||
end | end |