From 62d69e0ef6b3d6e958b822b0ad095bf8fbbc0df9 Mon Sep 17 00:00:00 2001 From: Blitz54 Date: Mon, 29 Jun 2026 07:19:56 +0000 Subject: [PATCH 1/2] Apply changes from https://github.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/pull/2325 --- src/Modules/ItemTools.lua.rej | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/Modules/ItemTools.lua.rej diff --git a/src/Modules/ItemTools.lua.rej b/src/Modules/ItemTools.lua.rej new file mode 100644 index 00000000000..9fdfefe7c62 --- /dev/null +++ b/src/Modules/ItemTools.lua.rej @@ -0,0 +1,28 @@ +diff a/src/Modules/ItemTools.lua b/src/Modules/ItemTools.lua (rejected hunks) +@@ -53,7 +53,7 @@ function itemLib.formatValue(value, baseValueScalar, valueScalar, precision, dis + elseif displayPrecision then + return tostring(value, displayPrecision) + else +- return tostring(roundSymmetric(value, precision and m_min(2, m_floor(math.log(precision, 10) + 0.001)) or 2)) -- max decimals ingame is 2 ++ return tostring(roundSymmetric(value, precision and m_min(2, m_floor(math.log(precision, 10) + 0.001)) or 2)) -- max decimals ingame is 2 + end + end + +@@ -117,7 +117,7 @@ function itemLib.applyRange(line, range, valueScalar, baseValueScalar) + modifiedLine = replaceNthInstance(modifiedLine, "#", values[i], i - substituted) + substituted = substituted + 1 + end +- ++ + -- Check if the modified line matches any scalability data + local key = modifiedLine:gsub("+#", "#") + if data.modScalability[key] then +@@ -339,7 +339,7 @@ function itemLib.formatModLine(modLine, dbMode) + line = line .. " ^1'" .. modLine.extra .. "'" + end + else +- colorCode = (modLine.crafted and colorCodes.CRAFTED) or (modLine.enchant and colorCodes.ENCHANTED) or (modLine.fractured and colorCodes.FRACTURED) or (modLine.mutated and colorCodes.MUTATED) or (modLine.custom and (not modLine.desecrated and colorCodes.CUSTOM)) or colorCodes.MAGIC ++ colorCode = (modLine.fractured and colorCodes.FRACTURED) or (modLine.crafted and colorCodes.CRAFTED) or (modLine.enchant and colorCodes.ENCHANTED) or (modLine.mutated and colorCodes.MUTATED) or (modLine.custom and (not modLine.desecrated and colorCodes.CUSTOM)) or colorCodes.MAGIC + end + return colorCode..line + end From ab7d0b23749ed9d552895c38ccf68e6eb4d50123 Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Tue, 21 Jul 2026 07:28:37 +1000 Subject: [PATCH 2/2] Fix port --- src/Modules/ItemTools.lua | 2 +- src/Modules/ItemTools.lua.rej | 28 ---------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 src/Modules/ItemTools.lua.rej diff --git a/src/Modules/ItemTools.lua b/src/Modules/ItemTools.lua index c7b2ab54b47..0dc6b2aeaff 100644 --- a/src/Modules/ItemTools.lua +++ b/src/Modules/ItemTools.lua @@ -135,7 +135,7 @@ function itemLib.formatModLine(modLine, dbMode) line = line .. " ^1'" .. modLine.extra .. "'" end else - colorCode = (modLine.crafted and colorCodes.CRAFTED) or (modLine.mutated and colorCodes.MUTATED) or (modLine.scourge and colorCodes.SCOURGE) or (modLine.custom and colorCodes.CUSTOM) or (modLine.fractured and colorCodes.FRACTURED) or (modLine.crucible and colorCodes.CRUCIBLE) or colorCodes.MAGIC + colorCode = (modLine.fractured and colorCodes.FRACTURED) or (modLine.crafted and colorCodes.CRAFTED) or (modLine.mutated and colorCodes.MUTATED) or (modLine.scourge and colorCodes.SCOURGE) or (modLine.custom and colorCodes.CUSTOM) or (modLine.crucible and colorCodes.CRUCIBLE) or colorCodes.MAGIC end return colorCode..line end diff --git a/src/Modules/ItemTools.lua.rej b/src/Modules/ItemTools.lua.rej deleted file mode 100644 index 9fdfefe7c62..00000000000 --- a/src/Modules/ItemTools.lua.rej +++ /dev/null @@ -1,28 +0,0 @@ -diff a/src/Modules/ItemTools.lua b/src/Modules/ItemTools.lua (rejected hunks) -@@ -53,7 +53,7 @@ function itemLib.formatValue(value, baseValueScalar, valueScalar, precision, dis - elseif displayPrecision then - return tostring(value, displayPrecision) - else -- return tostring(roundSymmetric(value, precision and m_min(2, m_floor(math.log(precision, 10) + 0.001)) or 2)) -- max decimals ingame is 2 -+ return tostring(roundSymmetric(value, precision and m_min(2, m_floor(math.log(precision, 10) + 0.001)) or 2)) -- max decimals ingame is 2 - end - end - -@@ -117,7 +117,7 @@ function itemLib.applyRange(line, range, valueScalar, baseValueScalar) - modifiedLine = replaceNthInstance(modifiedLine, "#", values[i], i - substituted) - substituted = substituted + 1 - end -- -+ - -- Check if the modified line matches any scalability data - local key = modifiedLine:gsub("+#", "#") - if data.modScalability[key] then -@@ -339,7 +339,7 @@ function itemLib.formatModLine(modLine, dbMode) - line = line .. " ^1'" .. modLine.extra .. "'" - end - else -- colorCode = (modLine.crafted and colorCodes.CRAFTED) or (modLine.enchant and colorCodes.ENCHANTED) or (modLine.fractured and colorCodes.FRACTURED) or (modLine.mutated and colorCodes.MUTATED) or (modLine.custom and (not modLine.desecrated and colorCodes.CUSTOM)) or colorCodes.MAGIC -+ colorCode = (modLine.fractured and colorCodes.FRACTURED) or (modLine.crafted and colorCodes.CRAFTED) or (modLine.enchant and colorCodes.ENCHANTED) or (modLine.mutated and colorCodes.MUTATED) or (modLine.custom and (not modLine.desecrated and colorCodes.CUSTOM)) or colorCodes.MAGIC - end - return colorCode..line - end