Skip to content

Commit f4323e4

Browse files
author
justjuangui
committed
enhanced escapeGGGString
1 parent d31ce1d commit f4323e4

3 files changed

Lines changed: 552 additions & 515 deletions

File tree

src/Export/Scripts/passivetree_ggg.lua

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,6 @@ for id, node in pairs(data.nodes) do
269269
["isKeystone"] = node.isKeystone,
270270
["isOnlyImage"] = node.isMastery,
271271
["activeEffectImage"] = node.activeEffectImage,
272-
["isJewelSocket"] = node.isJewelSocket and not node.ascendancyId and true or nil,
273-
["containJewelSocket"] = node.isJewelSocket and node.ascendancyId and true or nil,
274272
["isAscendancyStart"] = node.isAscendancyStart,
275273
["isMultipleChoice"] = node.isMultipleChoice,
276274
["isMultipleChoiceOption"] = node.isMultipleChoiceOption,
@@ -288,6 +286,7 @@ for id, node in pairs(data.nodes) do
288286
unalloc= node.isNotable and "AscendancyFrameNotableUnallocated" or "AscendancyFrameNormalUnallocated"
289287
}
290288
else
289+
nodeData["containJewelSocket"] = true
291290
nodeData["nodeOverlay"] = {
292291
alloc= "JewelSocketAltActive",
293292
path= "JewelSocketAltCanAllocate",
@@ -300,6 +299,8 @@ for id, node in pairs(data.nodes) do
300299
ascendancyGroups[ascendancyName].startId = node.isAscendancyStart and nodeId or ascendancyGroups[ascendancyName].startId
301300
ascendancyGroups[ascendancyName][node.group] = true
302301
else
302+
nodeData["isJewelSocket"] = node.isJewelSocket and not node.isBlighted and true or nil
303+
nodeData["containJewelSocket"] = node.isJewelSocket and node.isBlighted and true or nil
303304
-- recalculate max and min
304305
local group = tree.groups[node.group]
305306
tree.min_x = math.min(tree.min_x, group.x)
@@ -337,7 +338,7 @@ for id, node in pairs(data.nodes) do
337338
["stats"] = {}
338339
}
339340
for _, statDesc in ipairs(overrideNode.stats) do
340-
table.insert(optionData.stats, escapeGGGString(statDesc))
341+
table.insert(optionData.stats, sanitiseText(escapeGGGString(statDesc)))
341342
end
342343

343344
table.insert(nodeData["options"], optionData)
@@ -372,6 +373,12 @@ for id, node in pairs(data.nodes) do
372373
return
373374
end
374375

376+
-- skip nodes that are not active
377+
if data.nodes[nodeIdOut] and data.nodes[nodeIdOut].id == null then
378+
printf("Ignoring Out NodeId " .. nodeIdOut)
379+
goto nextOrbit
380+
end
381+
375382
-- TODO: minimal check
376383
local nodeOrbit = 0
377384
if orbitDataSearch.orbit ~= nil and orbitDataSearch.orbit ~= 0 then

src/Modules/Common.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,10 @@ function ImportBuild(importLink, callback)
10321032
end
10331033

10341034
function escapeGGGString(text)
1035-
local line = text:gsub("%[([^|%]]+)%]", "%1"):gsub("%[[^|]+|([^|]+)%]", "%1")
1035+
local line = text
1036+
:gsub("<[^>]+>{([^}]+)}", "%1")
1037+
:gsub("%[([^|%]]+)%]", "%1")
1038+
:gsub("%[[^|]+|([^|]+)%]", "%1")
10361039
return line
10371040
end
10381041

0 commit comments

Comments
 (0)