Skip to content

Commit ddce5d3

Browse files
Fix excluded/exclude variable mismatch and space indentation in Item.lua
- Fix two blocks (lines ~103-116, ~130-143) where variable was declared as 'local excluded' but then set/checked as 'exclude' (without 'd'). This created an accidental global that persisted across iterations. - Convert space indentation to tabs in jewel radius block (lines 449-457) to match codebase convention. Addresses review feedback from Nightblade on PR PathOfBuildingCommunity#8700.
1 parent 74e0df7 commit ddce5d3

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

src/Classes/Item.lua

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ local function getTagBasedModifiers(tagName, itemSlotName)
104104
if data.itemTagSpecial[tagName] and data.itemTagSpecial[tagName][itemSlotName] then
105105
for _, specialMod in ipairs(data.itemTagSpecial[tagName][itemSlotName]) do
106106
if dv:lower():find(specialMod:lower()) then
107-
exclude = true
107+
excluded = true
108108
break
109109
end
110110
end
111111
end
112-
if exclude then
112+
if excluded then
113113
found = true
114114
break
115115
end
@@ -131,12 +131,12 @@ local function getTagBasedModifiers(tagName, itemSlotName)
131131
if data.itemTagSpecial[tagName] and data.itemTagSpecial[tagName][itemSlotName] then
132132
for _, specialMod in ipairs(data.itemTagSpecial[tagName][itemSlotName]) do
133133
if dv:lower():find(specialMod:lower()) then
134-
exclude = true
134+
excluded = true
135135
break
136136
end
137137
end
138138
end
139-
if exclude then
139+
if excluded then
140140
found = true
141141
break
142142
end
@@ -446,14 +446,14 @@ function ItemClass:ParseRaw(raw, rarity, highQuality)
446446
elseif specName == "Radius" and self.type == "Jewel" then
447447
self.jewelRadiusLabel = specVal:match("^[%a ]+")
448448
if specVal:match("^[%a ]+") == "Variable" then
449-
-- Jewel radius is variable and must be read from it's mods instead after they are parsed
450-
deferJewelRadiusIndexAssignment = true
451-
else
452-
for index, data in pairs(data.jewelRadius) do
453-
if specVal:match("^[%a ]+") == data.label then
454-
self.jewelRadiusIndex = index
455-
break
456-
end
449+
-- Jewel radius is variable and must be read from it's mods instead after they are parsed
450+
deferJewelRadiusIndexAssignment = true
451+
else
452+
for index, data in pairs(data.jewelRadius) do
453+
if specVal:match("^[%a ]+") == data.label then
454+
self.jewelRadiusIndex = index
455+
break
456+
end
457457
end
458458
end
459459
elseif specName == "Limited to" and self.type == "Jewel" then

0 commit comments

Comments
 (0)