Skip to content

Conversation

@Gisbert12843
Copy link

@Gisbert12843 Gisbert12843 commented Dec 9, 2025

added the ability to hold alt while hovering a passive tree node to show jewel distance circles and highlighting nodes in their respective ranges

(to accommodate for the upcoming "Traveler's Wisdom Ascendancy Node of the Oracle)

(The Screenshot also holds "Ctrl" to hide the node info)

Github Diff sadly differs from the VSCode one. Comparing my changes to origin shows that i only inserted lines at 2 points in the file and did not formatted/adjusted others. Githubs Diff appears to be misleading here.

image

…how jewel distance circles and highlighting nodes in their respective ranges

(to accommodate for the upcoming "Traveler's Wisdom Ascendancy Node of the Oracle)
Copilot AI review requested due to automatic review settings December 9, 2025 15:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a quality-of-life feature for the upcoming Oracle ascendancy (Traveler's Wisdom node) by enabling ALT-key functionality to visualize jewel placement distances. When holding ALT while hovering over any passive tree node, the feature displays colored radius circles around that node and highlights all nodes within those jewel radius ranges.

Key changes:

  • ALT+hover displays jewel radius circles (Small/Medium/Large/Very Large) centered on the hovered node
  • Nodes within each radius range are highlighted with colored rings matching the radius color
  • Existing jewel socket visualization code has been re-indented (no logic changes)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +857 to +873
if IsKeyDown("ALT") and hoverNode and node ~= hoverNode then
local dx = node.x - hoverNode.x
local dy = node.y - hoverNode.y
local distSq = dx*dx + dy*dy
for _, radData in ipairs(build.data.jewelRadius) do
if radData.inner == 0 then
local r = radData.outer * build.data.gameConstants["PassiveTreeJewelDistanceMultiplier"]
if distSq <= r * r then
SetDrawLayer(nil, 30)
SetDrawColor(radData.col)
local size = 140 * scale / self.zoom ^ 0.2
DrawImage(self.highlightRing, scrX - size, scrY - size, size * 2, size * 2)
break
end
end
end
end
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code executes distance calculations for every node in the passive tree (potentially thousands of nodes) on every frame while ALT is held and a node is hovered. Consider optimizing by:

  1. Pre-calculating which nodes fall within jewel radii when the hover node changes (similar to how nodesInRadius is used for jewel sockets at line 810)
  2. Caching results when the hovered node hasn't changed
  3. Or limiting the check to nodes within a maximum possible jewel radius distance first

Copilot uses AI. Check for mistakes.
@Nightblade
Copy link
Contributor

Please set your editor to TAB indents for this code-base.

@Gisbert12843
Copy link
Author

Fixed now? A bit hard to verify from my end.

@Nightblade
Copy link
Contributor

Fixed now? A bit hard to verify from my end.

I think so, thanks.

In VSCode you can press F1, type render and select View: Toggle Render Whitespace.

@Gisbert12843
Copy link
Author

If you need me to address this weird spell check pipeline tell me please, would really like my feature to be implemented in an upcoming beta as soon as you find time

@Wires77
Copy link
Member

Wires77 commented Dec 12, 2025

I like this idea a lot. We're pretty busy with new league updates until next week, but if it looks good it should make it in a release soon.

@Gisbert12843
Copy link
Author

Thank you for all that work!

@Wires77
Copy link
Member

Wires77 commented Dec 14, 2025

A couple comments after testing it out:

  • Probably only need it to work when hovering keystones right now. If there are other changes in the future it'd be easy enough to change that conditional again
  • In a similar vein, just show the medium radius when hovering keystones. Showing them all is likely to confuse just as many users as it helps
  • Any reason we didn't just use the existing shading seen when hovering jewel sockets? I'd like to be consistent here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants