Skip to content

Commit 5480268

Browse files
authored
Add source attribute to mods from radius jewels of type "LIST", that has a "table" instead of a numeric value in the attribute value (#1539)
1 parent eb23562 commit 5480268

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/Modules/ModParser.lua

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6530,25 +6530,31 @@ local jewelOtherFuncs = {
65306530
end
65316531
end
65326532
end,
6533-
["^(%w+) Passive Skills in Radius also grant (.*)$"] = function(type, mod)
6533+
["^(%w+) Passive Skills in Radius also grant (.*)$"] = function(passiveType, mod)
65346534
return function(node, out, data)
6535-
if node and (node.type == firstToUpper(type) or (node.type == "Normal" and not node.isAttribute and firstToUpper(type) == "Small")) then
6535+
if node and (node.type == firstToUpper(passiveType) or (node.type == "Normal" and not node.isAttribute and firstToUpper(passiveType) == "Small")) then
65366536
local modList, line = parseMod(mod)
65376537
if not line and modList[1] then -- something failed to parse, do not add to list
65386538
modList[1].parsedLine = capitalizeWordsInString(mod)
65396539
modList[1].source = data.modSource
6540+
if type(modList[1].value) == "table" and modList[1].value.mod then
6541+
modList[1].value.mod.source = data.modSource
6542+
end
65406543
out:AddMod(modList[1])
65416544
end
65426545
end
65436546
end
65446547
end,
6545-
["conquered (%w+) Passive Skills also grant (.*)$"] = function(type, mod)
6548+
["conquered (%w+) Passive Skills also grant (.*)$"] = function(passiveType, mod)
65466549
return function(node, out, data)
6547-
if node and (node.type == firstToUpper(type) or (node.type == "Normal" and not node.isAttribute and firstToUpper(type) == "Small") or (node.type == "Normal" and node.isAttribute and firstToUpper(type) == "Attribute")) then
6550+
if node and (node.type == firstToUpper(passiveType) or (node.type == "Normal" and not node.isAttribute and firstToUpper(passiveType) == "Small") or (node.type == "Normal" and node.isAttribute and firstToUpper(passiveType) == "Attribute")) then
65486551
local modList, line = parseMod(mod)
65496552
if not line and modList[1] then -- something failed to parse, do not add to list
65506553
modList[1].parsedLine = capitalizeWordsInString(mod)
65516554
modList[1].source = data.modSource
6555+
if type(modList[1].value) == "table" and modList[1].value.mod then
6556+
modList[1].value.mod.source = data.modSource
6557+
end
65526558
out:AddMod(modList[1])
65536559
end
65546560
end

0 commit comments

Comments
 (0)