@@ -137,47 +137,6 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
137137 end
138138 end
139139
140- self .nodeOverlay = {
141- Normal = {
142- artWidth = 70 ,
143- alloc = " PSSkillFrameActive" ,
144- path = " PSSkillFrameHighlighted" ,
145- unalloc = " PSSkillFrame" ,
146- allocAscend = " AscendancyFrameSmallAllocated" ,
147- pathAscend = " AscendancyFrameSmallCanAllocate" ,
148- unallocAscend = " AscendancyFrameSmallNormal"
149- },
150- Notable = {
151- artWidth = 100 ,
152- alloc = " NotableFrameAllocated" ,
153- path = " NotableFrameCanAllocate" ,
154- unalloc = " NotableFrameUnallocated" ,
155- allocAscend = " AscendancyFrameLargeAllocated" ,
156- pathAscend = " AscendancyFrameLargeCanAllocate" ,
157- unallocAscend = " AscendancyFrameLargeNormal" ,
158- allocBlighted = " BlightedNotableFrameAllocated" ,
159- pathBlighted = " BlightedNotableFrameCanAllocate" ,
160- unallocBlighted = " BlightedNotableFrameUnallocated" ,
161- },
162- Keystone = {
163- artWidth = 138 ,
164- alloc = " KeystoneFrameAllocated" ,
165- path = " KeystoneFrameCanAllocate" ,
166- unalloc = " KeystoneFrameUnallocated" ,
167- allocBlighted = " KeystoneFrameAllocated" ,
168- pathBlighted = " KeystoneFrameCanAllocate" ,
169- unallocBlighted = " KeystoneFrameUnallocated" ,
170- },
171- Socket = {
172- artWidth = 100 ,
173- alloc = " JewelFrameAllocated" ,
174- path = " JewelFrameCanAllocate" ,
175- unalloc = " JewelFrameUnallocated" ,
176- allocAlt = " JewelSocketAltActive" ,
177- pathAlt = " JewelSocketAltCanAllocate" ,
178- unallocAlt = " JewelSocketAltNormal" ,
179- },
180- }
181140 for type , data in pairs (self .nodeOverlay ) do
182141 local asset = self :GetAssetByName (data .alloc )
183142 local artWidth = asset .width * self .scaleImage
518477-- Common processing code for nodes (used for both real tree nodes and subgraph nodes)
519478function PassiveTreeClass :ProcessNode (node )
520479 node .targetSize = self :GetNodeTargetSize (node )
521- node .overlay = node .containJewelSocket and node .jewelOverlay or self .nodeOverlay [node .type ]
480+ local overlayData
481+ if node .nodeOverlay then
482+ overlayData = { }
483+ for type , data in pairs (node .nodeOverlay ) do
484+ overlayData [type ] = data
485+ end
486+ local asset = self :GetAssetByName (overlayData .alloc )
487+ local artWidth = asset .width * self .scaleImage
488+ overlayData .artWidth = artWidth
489+ overlayData .size = artWidth
490+ overlayData .rsq = overlayData .size * overlayData .size
491+ else
492+ overlayData = self .nodeOverlay [node .type ]
493+ end
494+ node .overlay = overlayData
522495 if node .overlay then
523496 local size = node .targetSize [" overlay" ] and node .targetSize [" overlay" ].width or node .targetSize .width
524497 node .rsq = size * size
588561function PassiveTreeClass :BuildConnector (node1 , node2 , connection )
589562 local connector = {
590563 ascendancyName = node1 .ascendancyName ,
564+ connectionArt = node1 .connectionArt or node2 .connectionArt or self .connectionArt [node1 .ascendancyName and " ascendancy" or " default" ],
591565 nodeId1 = node1 .id ,
592566 nodeId2 = node2 .id ,
593567 c = { } -- This array will contain the quad's data: 1-8 are the vertex coordinates, 9-16 are the texture coordinates
@@ -682,7 +656,7 @@ function PassiveTreeClass:BuildConnector(node1, node2, connection)
682656
683657 -- Generate a straight line
684658 connector .type = " LineConnector"
685- local art = self :GetAssetByName (" LineConnectorNormal" )
659+ local art = self :GetAssetByName (connector . connectionArt .. " LineConnectorNormal" )
686660 local vX , vY = node2 .x - node1 .x , node2 .y - node1 .y
687661 local dist = m_sqrt (vX * vX + vY * vY )
688662 local scale = art .height * 0.5 * self .scaleImage / dist
@@ -718,7 +692,7 @@ function PassiveTreeClass:BuildArc(arcAngle, orbit, xScale, yScale, angle, conne
718692 connector .vert = { }
719693 for _ , state in pairs ({ " Normal" , " Intermediate" , " Active" }) do
720694 -- The different line states have differently-sized artwork, so the vertex coords must be calculated separately for each one
721- local art = self :GetAssetByName (connector .type .. state )
695+ local art = self :GetAssetByName ( connector . connectionArt .. connector .type .. state )
722696 local size = art .width * self .scaleImage -- self.orbitRadii[orbit + 1] * self.scaleImage
723697 local oX , oY = size * m_sqrt (2 ) * m_sin (angle + m_pi / 4 ), size * m_sqrt (2 ) * - m_cos (angle + m_pi / 4 )
724698 local cX , cY = xScale + oX , yScale + oY
0 commit comments