Skip to content

Commit 38fffd3

Browse files
committed
Fix split tree nodes
1 parent d3b5aec commit 38fffd3

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

src/Classes/PassiveTree.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ function PassiveTreeClass:ProcessStats(node, startIndex)
804804
if list and not extra then
805805
-- Success, add dummy mod lists to the other lines that were combined with this one
806806
for ci = i + 1, endI do
807-
node.mods[ci] = { list = { } }
807+
node.mods[ci] = { list = {}, combined = true }
808808
end
809809
break
810810
end

src/Modules/ConfigModBrowser.lua

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,23 @@ function M.OpenAddModPopup(configTab, blockData)
161161
end
162162
end
163163
else
164-
for i, line in ipairs(node.stats) do
164+
local i = 1
165+
while node.stats[i] do
166+
local combinedLine = node.stats[i]
167+
while node.mods[i + 1] do
168+
local nextMod = node.mods[i + 1]
169+
if nextMod.combined then
170+
combinedLine = combinedLine .. node.stats[i + 1]
171+
i = i + 1
172+
else
173+
break
174+
end
175+
end
165176
local supported = not not node.mods[i].list and not node.mods[i].extra
166177
local ascendancyPrefix = node.isBloodline and "Bloodline " or
167178
node.ascendancyName and "Ascendancy " or ""
168-
addModLine(modSet, line, string.format("%s%s Node", ascendancyPrefix, node.type), supported)
179+
addModLine(modSet, combinedLine, string.format("%s%s Node", ascendancyPrefix, node.type), supported)
180+
i = i + 1
169181
end
170182
end
171183
end

0 commit comments

Comments
 (0)