Skip to content

Commit d948db9

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 5e54d98 commit d948db9

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
@@ -3401,6 +3401,8 @@ end
34013401

34023402
-- Radius jewels can change conquered nodes and orphaned allocations, so compare
34033403
-- against a rebuilt spec instead of approximating the diff with removeNodes.
3404+
-- Keep this list in sync with PassiveSpec's constructor, Init, and Select*
3405+
-- methods; omitted fields fail safe as nil on the comparison spec.
34043406
local sharedSpecKeysForJewelComparison = {
34053407
build = true,
34063408
treeVersion = true,
@@ -3491,9 +3493,9 @@ local function buildSpecForJewelComparison(itemsTab, compareSlot, replacementIte
34913493
spec.jewels[compareSlot.nodeId] = nil
34923494
end
34933495

3494-
local ok, err = pcall(function()
3496+
local ok, err = xpcall(function()
34953497
spec:BuildAllDependsAndPaths()
3496-
end)
3498+
end, debug.traceback)
34973499
if tempItemId then
34983500
itemsTab.items[tempItemId] = nil
34993501
end

0 commit comments

Comments
 (0)