-
Notifications
You must be signed in to change notification settings - Fork 246
added jewel ranges for passive tree nodes while holding ALT (Oracle QoL) #1544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
…how jewel distance circles and highlighting nodes in their respective ranges (to accommodate for the upcoming "Traveler's Wisdom Ascendancy Node of the Oracle)
There was a problem hiding this 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.
| 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 |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
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:
- Pre-calculating which nodes fall within jewel radii when the hover node changes (similar to how
nodesInRadiusis used for jewel sockets at line 810) - Caching results when the hovered node hasn't changed
- Or limiting the check to nodes within a maximum possible jewel radius distance first
|
Please set your editor to TAB indents for this code-base. |
|
Fixed now? A bit hard to verify from my end. |
I think so, thanks. In VSCode you can press F1, type |
|
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 |
|
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. |
|
Thank you for all that work! |
|
A couple comments after testing it out:
|
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.