Skip to content

Commit f174020

Browse files
committed
Harden radius jewel comparison follow-up
Strengthen the replacement tooltip test, preserve traceback when rebuilding comparison specs, and document the PassiveSpec field allowlist. Addresses full-branch review follow-ups from exploration 20260512T124426Z-codex-exploration-159337fbb665 and request 20260512T125918Z-codex-1dca732498d9.
1 parent dbf03fd commit f174020

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

spec/System/TestRadiusJewelStatDiff_spec.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,8 @@ describe("TestRadiusJewelStatDiff", function()
461461

462462
assert.is_true(tooltipContains(tooltip, "Equipping this item in"),
463463
"Replacing the radius jewel should show the stat loss from unsupported nodes")
464+
assert.is_true(tooltipContainsNegativeStat(tooltip, "Total Life"),
465+
"Replacing the radius jewel should remove the life node only supported by that jewel:\n" .. tooltipText(tooltip))
464466
end)
465467

466468
it("intuitiveLeapLike removal comparison keeps nodes supported by another radius jewel", function()

src/Classes/ItemsTab.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3504,6 +3504,8 @@ end
35043504

35053505
-- Radius jewels can change conquered nodes and orphaned allocations, so compare
35063506
-- against a rebuilt spec instead of approximating the diff with removeNodes.
3507+
-- Keep this list in sync with PassiveSpec's constructor, Init, and Select*
3508+
-- methods; omitted fields fail safe as nil on the comparison spec.
35073509
local sharedSpecKeysForJewelComparison = {
35083510
build = true,
35093511
treeVersion = true,
@@ -3594,9 +3596,9 @@ local function buildSpecForJewelComparison(itemsTab, compareSlot, replacementIte
35943596
spec.jewels[compareSlot.nodeId] = nil
35953597
end
35963598

3597-
local ok, err = pcall(function()
3599+
local ok, err = xpcall(function()
35983600
spec:BuildAllDependsAndPaths()
3599-
end)
3601+
end, debug.traceback)
36003602
if tempItemId then
36013603
itemsTab.items[tempItemId] = nil
36023604
end

0 commit comments

Comments
 (0)