Skip to content

Commit f883477

Browse files
committed
Add source attribute to mods from radius jewels of type "LIST", that has a "table" instead of a numeric value in the attribute value
1 parent 79fc9cb commit f883477

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
@@ -6517,25 +6517,31 @@ local jewelOtherFuncs = {
65176517
end
65186518
end
65196519
end,
6520-
["^(%w+) Passive Skills in Radius also grant (.*)$"] = function(type, mod)
6520+
["^(%w+) Passive Skills in Radius also grant (.*)$"] = function(passiveType, mod)
65216521
return function(node, out, data)
6522-
if node and (node.type == firstToUpper(type) or (node.type == "Normal" and not node.isAttribute and firstToUpper(type) == "Small")) then
6522+
if node and (node.type == firstToUpper(passiveType) or (node.type == "Normal" and not node.isAttribute and firstToUpper(passiveType) == "Small")) then
65236523
local modList, line = parseMod(mod)
65246524
if not line and modList[1] then -- something failed to parse, do not add to list
65256525
modList[1].parsedLine = capitalizeWordsInString(mod)
65266526
modList[1].source = data.modSource
6527+
if type(modList[1].value) == "table" and modList[1].value.mod then
6528+
modList[1].value.mod.source = data.modSource
6529+
end
65276530
out:AddMod(modList[1])
65286531
end
65296532
end
65306533
end
65316534
end,
6532-
["conquered (%w+) Passive Skills also grant (.*)$"] = function(type, mod)
6535+
["conquered (%w+) Passive Skills also grant (.*)$"] = function(passiveType, mod)
65336536
return function(node, out, data)
6534-
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
6537+
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
65356538
local modList, line = parseMod(mod)
65366539
if not line and modList[1] then -- something failed to parse, do not add to list
65376540
modList[1].parsedLine = capitalizeWordsInString(mod)
65386541
modList[1].source = data.modSource
6542+
if type(modList[1].value) == "table" and modList[1].value.mod then
6543+
modList[1].value.mod.source = data.modSource
6544+
end
65396545
out:AddMod(modList[1])
65406546
end
65416547
end

0 commit comments

Comments
 (0)