Skip to content

Commit 5353b82

Browse files
authored
Only show scalable lines in roll ranges menu and show scaled tooltip (#2363)
1 parent 792d638 commit 5353b82

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Classes/ItemsTab.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2854,7 +2854,9 @@ function ItemsTabClass:CorruptDisplayItem() -- todo implement vaal orb new outco
28542854
selectedVariant = true
28552855
end
28562856
end
2857-
if #variantIds > 0 and selectedVariant or #variantIds == 0 then
2857+
-- test if a mod is scalable at all. this will let through mods that scale, but don't actually change within the corrupt range
2858+
local testScaledLine = itemLib.applyRange(mod.line, mod.range or main.defaultItemAffixQuality, mod.valueScalar or 1, 2)
2859+
if not (testScaledLine == mod.line) and (#variantIds > 0 and selectedVariant or #variantIds == 0) then
28582860
local label = ""
28592861
controls["rollRangeValue"..i] = new("LabelControl", {"TOPLEFT",nil,"TOPLEFT"}, {10, 10 + offset, 200, 16}, "^71.00")
28602862
controls["rollRangeSlider"..i] = new("SliderControl", { "LEFT", controls["rollRangeValue"..i], "RIGHT" }, {5, 0, 80, 18}, function(val)
@@ -2993,7 +2995,7 @@ function ItemsTabClass:CorruptDisplayItem() -- todo implement vaal orb new outco
29932995
end)
29942996
controls.save.tooltipFunc = function(tooltip)
29952997
tooltip:Clear()
2996-
self:AddItemTooltip(tooltip, corruptItem(controls.enchant1.shown), nil, true)
2998+
self:AddItemTooltip(tooltip, corruptItem(controls.enchant1.shown))
29972999
end
29983000
controls.close = new("ButtonControl", nil, {45, 69 + enchantNum * 20, 80, 20}, "Cancel", function()
29993001
main:ClosePopup()

0 commit comments

Comments
 (0)