From 62d69e0ef6b3d6e958b822b0ad095bf8fbbc0df9 Mon Sep 17 00:00:00 2001 From: Blitz54 Date: Mon, 29 Jun 2026 07:19:56 +0000 Subject: [PATCH] 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 0000000000..9fdfefe7c6 --- /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