Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Modules/ItemTools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading