diff --git a/src/Modules/ItemTools.lua b/src/Modules/ItemTools.lua index e24ae4ff6e..a7207a9c5b 100644 --- a/src/Modules/ItemTools.lua +++ b/src/Modules/ItemTools.lua @@ -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