Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6c1d128
remove Variant, AltQual, QualityId from SkillsTab and every damn plac…
Peechey Mar 3, 2026
d2cb398
clean up old list, re add variant
Peechey Mar 3, 2026
5d120e0
separate dropdown for imbued support, import, save/load
Peechey Mar 15, 2026
c244ce3
disable imbued for other socketGroups of a slot if another already ha…
Peechey Mar 16, 2026
8a03334
clean up old code
Peechey Mar 16, 2026
e8c32b9
refactor to use GemSelectControl, dps sort integrated into new imbued…
Peechey Mar 18, 2026
b79243f
comments
Peechey Mar 18, 2026
30cdcfb
add gem color to text
Peechey Mar 19, 2026
0f5514b
comments
Peechey Mar 19, 2026
86901ca
remove unused code
Peechey Mar 19, 2026
dfd3a21
remove more unused code
Peechey Mar 19, 2026
4f49335
pr comments: tooltip showing for imbued, use better field for text co…
Peechey Mar 22, 2026
3f8d4c0
fix quality tooltip to show quality lines that were previously on var…
Peechey Apr 13, 2026
f2f1be3
Merge branch 'dev' into feature/imbued-support-implementation
Peechey Apr 13, 2026
9803db6
pr comments (clean up, tooltip update, UI change)
Peechey Apr 14, 2026
71eeba7
Fix sort list
Apr 14, 2026
17571b6
Remove more quality lines
Apr 14, 2026
79c5abb
Merge branch 'dev' into feature/imbued-support-implementation
Apr 14, 2026
d18b835
Fix imbued gem overwrite on import
Apr 14, 2026
5766193
Fix issue when swapping weapon slots
Apr 14, 2026
82a0b04
Fix imbued supports blocking other skill sets
Apr 14, 2026
86c1512
Fix item granted supports regression
Apr 14, 2026
7536d38
Fix crash on clicking on imbued slot with no active skill gem
Apr 14, 2026
3d73327
Fix Imbued supports not being reset on socket delete or wipe
Apr 14, 2026
456bb41
Merge branch 'dev' into feature/imbued-support-implementation
Apr 14, 2026
0b8a522
Only use sort cache on support for imbued dropdown making it way faster
Apr 14, 2026
bc9399c
Fix invisible support and active boxes applying when clicking on box
Apr 14, 2026
3030b9e
Fix imbued support dropdown showing legacy Awakened gems
Wires77 Apr 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 72 additions & 44 deletions src/Classes/GemSelectControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ local m_max = math.max
local m_floor = math.floor

local toolTipText = "Prefix tag searches with a colon and exclude tags with a dash. e.g. :fire:lightning:-cold:area"
local imbuedTooltipText = "\"Socketed in\" item must be set in order to add an imbued support.\nOnly one imbued support is allowed per item."

local GemSelectClass = newClass("GemSelectControl", "EditControl", function(self, anchor, rect, skillsTab, index, changeFunc, forceTooltip)
local GemSelectClass = newClass("GemSelectControl", "EditControl", function(self, anchor, rect, skillsTab, index, changeFunc, forceTooltip, imbued)
self.EditControl(anchor, rect, nil, nil, "^ %a':-")
self.controls.scrollBar = new("ScrollBarControl", { "TOPRIGHT", self, "TOPRIGHT" }, {-1, 0, 18, 0}, (self.height - 4) * 4)
self.controls.scrollBar.y = function()
Expand Down Expand Up @@ -50,6 +51,7 @@ local GemSelectClass = newClass("GemSelectControl", "EditControl", function(self
lifeReservationFlat = "Life",
lifeReservationPercent = "LifePercent",
}
self.imbuedSelect = imbued
end)

function GemSelectClass:CalcOutputWithThisGem(calcFunc, gemData, useFullDPS)
Expand All @@ -74,7 +76,7 @@ function GemSelectClass:CalcOutputWithThisGem(calcFunc, gemData, useFullDPS)

-- Create gemInstance to represent the hovered gem
local gemInstance = gemList[self.index]
gemInstance.level = self.skillsTab:ProcessGemLevel(gemData)
gemInstance.level = self.skillsTab:ProcessGemLevel(gemData, self.imbuedSelect)
gemInstance.gemData = gemData
gemInstance.displayEffect = nil
-- Calculate the impact of using this gem
Expand Down Expand Up @@ -105,12 +107,19 @@ function GemSelectClass:PopulateGemList()
if (self.sortGemsBy and gemData.tags[self.sortGemsBy] == true or not self.sortGemsBy) then
local levelRequirement = gemData.grantedEffect.levels[1].levelRequirement or 1
if characterLevel >= levelRequirement or not matchLevel then
if (showExceptional or showAll) and ((gemData.grantedEffect.legacy and gemData.grantedEffect.plusVersionOf) or gemData.tagString:match("Exceptional")) then
if self.skillsTab.showLegacyGems or not gemData.grantedEffect.legacy then
if self.imbuedSelect then
-- Imbued dropdown only allows non-exceptional support gems.
if gemData.grantedEffect.support and not gemData.tagString:match("Exceptional") and not gemData.grantedEffect.plusVersionOf then
self.gems["Default:" .. gemId] = gemData
end
else
if (showExceptional or showAll) and ((gemData.grantedEffect.legacy and gemData.grantedEffect.plusVersionOf) or gemData.tagString:match("Exceptional")) then
if self.skillsTab.showLegacyGems or not gemData.grantedEffect.legacy then
self.gems["Default:" .. gemId] = gemData
end
elseif showNormal or showAll then
self.gems["Default:" .. gemId] = gemData
end
elseif showNormal or showAll then
self.gems["Default:" .. gemId] = gemData
end
end
end
Expand All @@ -123,6 +132,11 @@ function GemSelectClass:FilterSupport(gemId, gemData)
if gemData.grantedEffect.legacy and not self.skillsTab.showLegacyGems then
return false
end

if self.imbuedSelect then
return gemData.grantedEffect.support and not gemData.tagString:match("Exceptional") and self.sortCache.canSupport[gemId]
end

return (not gemData.grantedEffect.support
or showSupportTypes == "ALL"
or (showSupportTypes == "NORMAL" and not (isLegacyAwakened or gemData.tagString:match("Exceptional")))
Expand Down Expand Up @@ -273,7 +287,7 @@ function GemSelectClass:UpdateSortCache()
for gemId, gemData in pairs(self.gems) do
if gemData.grantedEffect.support then
for _, activeSkill in ipairs(self.skillsTab.displayGroup.displaySkillList) do
if calcLib.canGrantedEffectSupportActiveSkill(gemData.grantedEffect, activeSkill) then
if calcLib.canGrantedEffectSupportActiveSkill(gemData.grantedEffect, activeSkill, self.imbuedSelect) then
sortCache.canSupport[gemId] = true
break
end
Expand All @@ -288,7 +302,7 @@ function GemSelectClass:UpdateSortCache()
for gemId, gemData in pairs(self.gems) do
if gemData.grantedEffect.support then
for _, activeSkill in ipairs(group.displaySkillList) do
if calcLib.canGrantedEffectSupportActiveSkill(gemData.grantedEffect, activeSkill) then
if calcLib.canGrantedEffectSupportActiveSkill(gemData.grantedEffect, activeSkill, self.imbuedSelect) then
sortCache.canSupport[gemId] = true
break
end
Expand All @@ -301,7 +315,7 @@ function GemSelectClass:UpdateSortCache()
for gemId, gemData in pairs(self.gems) do
if gemData.grantedEffect.support then
for _, activeSkill in ipairs(group.displaySkillList) do
if calcLib.canGrantedEffectSupportActiveSkill(gemData.grantedEffect, activeSkill) then
if calcLib.canGrantedEffectSupportActiveSkill(gemData.grantedEffect, activeSkill, self.imbuedSelect) then
sortCache.canSupport[gemId] = true
break
end
Expand Down Expand Up @@ -468,7 +482,7 @@ function GemSelectClass:Draw(viewPort, noTooltip)
local gemData = self.gems[self.list[self.hoverSel]]
local output= self:CalcOutputWithThisGem(calcFunc, gemData, self.skillsTab.sortGemsByDPSField == "FullDPS")
local gemInstance = {
level = self.skillsTab:ProcessGemLevel(gemData),
level = self.skillsTab:ProcessGemLevel(gemData, self.imbuedSelect),
quality = self.skillsTab.defaultGemQuality or 0,
count = 1,
enabled = true,
Expand Down Expand Up @@ -508,41 +522,55 @@ function GemSelectClass:Draw(viewPort, noTooltip)
local gemInstance = self.skillsTab.displayGroup.gemList[self.index]
local cursorX, cursorY = GetCursorPos()
self.tooltip:Clear()

if hoverControl and hoverControl.imbuedSelect then -- tooltip for imbued
gemInstance = { }
if type(hoverControl.gemId) == "string" then -- on select
gemInstance["gemData"] = hoverControl.gems[hoverControl.gemId]
else -- on load
gemInstance["gemData"] = hoverControl.gemId
end
gemInstance.level = 1
gemInstance.quality = 0
end

if gemInstance and gemInstance.gemData then
self:AddGemTooltip(gemInstance)
else
self.tooltip:AddLine(16, toolTipText)
end
self.tooltip:AddLine(16, self.imbuedSelect and imbuedTooltipText or toolTipText)
end

if not self.imbuedSelect then
colorS = 0.5
colorA = 0.5
if cursorX > (x + width - 18) then
colorS = 1
self.tooltip:Clear()
self.tooltip:AddLine(16, "Only show Support gems")
elseif (cursorX > (x + width - 40) and cursorX < (cursorX + width - 20)) then
colorA = 1
self.tooltip:Clear()
self.tooltip:AddLine(16, "Only show Active gems")
end

colorS = 0.5
colorA = 0.5
if cursorX > (x + width - 18) then
colorS = 1
self.tooltip:Clear()
self.tooltip:AddLine(16, "Only show Support gems")
elseif (cursorX > (x + width - 40) and cursorX < (cursorX + width - 20)) then
colorA = 1
self.tooltip:Clear()
self.tooltip:AddLine(16, "Only show Active gems")
end

-- support shortcut
sx = x + width - 16 - 2
SetDrawColor(colorS,colorS,colorS)
DrawImage(nil, sx, y+2, 16, height-4)
SetDrawColor(0,0,0)
DrawImage(nil, sx+1, y+2, 16-2, height-4)
SetDrawColor(colorS,colorS,colorS)
DrawString(sx + 8, y, "CENTER_X", height - 2, "VAR", "S")

-- active shortcut
sx = x + width - (16*2) - (2*2)
SetDrawColor(colorA,colorA,colorA)
DrawImage(nil, sx, y+2, 16, height-4)
SetDrawColor(0,0,0)
DrawImage(nil, sx+1, y+2, 16-2, height-4)
SetDrawColor(colorA,colorA,colorA)
DrawString(sx + 8, y, "CENTER_X", height - 2, "VAR", "A")
-- support shortcut
sx = x + width - 16 - 2
SetDrawColor(colorS,colorS,colorS)
DrawImage(nil, sx, y+2, 16, height-4)
SetDrawColor(0,0,0)
DrawImage(nil, sx+1, y+2, 16-2, height-4)
SetDrawColor(colorS,colorS,colorS)
DrawString(sx + 8, y, "CENTER_X", height - 2, "VAR", "S")

-- active shortcut
sx = x + width - (16*2) - (2*2)
SetDrawColor(colorA,colorA,colorA)
DrawImage(nil, sx, y+2, 16, height-4)
SetDrawColor(0,0,0)
DrawImage(nil, sx+1, y+2, 16-2, height-4)
SetDrawColor(colorA,colorA,colorA)
DrawString(sx + 8, y, "CENTER_X", height - 2, "VAR", "A")
end

SetDrawLayer(nil, 10)
self.tooltip:Draw(x, y, width, height, viewPort)
Expand Down Expand Up @@ -738,7 +766,7 @@ function GemSelectClass:OnFocusGained()
self:UpdateSortCache()
self:BuildList("")
for index, gemId in pairs(self.list) do
if self.gems[gemId].name == self.buf then
if self.gems[gemId] and self.gems[gemId].name == self.buf then
self.selIndex = index
self:ScrollSelIntoView()
break
Expand Down Expand Up @@ -768,7 +796,7 @@ function GemSelectClass:OnKeyDown(key, doubleClick)
local width, height = self:GetSize()
local cursorX, cursorY = GetCursorPos()
-- constrain cursor to the height of the control
if key == "LEFTBUTTON" and (cursorY > y and cursorY < (y + height)) then
if not self.imbuedSelect and key == "LEFTBUTTON" and (cursorY > y and cursorY < (y + height)) then
-- no need to constrain right side of the S overlay as that's outside hover
if cursorX > (x + width - 18) then
self.sortGemsBy = "support" -- only need to change sortBy, code will continue to UpdateSortCache
Expand Down Expand Up @@ -880,4 +908,4 @@ function GemSelectClass:OnKeyUp(key)
end
local newSel = self.EditControl:OnKeyUp(key)
return newSel == self.EditControl and self or newSel
end
end
5 changes: 5 additions & 0 deletions src/Classes/ImportTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@ function ImportTabClass:ImportItemsAndSkills(json)
end
end
wipeTable(self.build.skillsTab.socketGroupList)
self.build.skillsTab:RebuildImbuedSupportBySlot()
end
self.charImportStatus = colorCodes.POSITIVE.."Items and skills successfully imported."
--ConPrintTable(charItemData)
Expand Down Expand Up @@ -1148,6 +1149,10 @@ function ImportTabClass:ImportSocketedItems(item, socketedItems, slotName)
else
t_insert(socketGroup.gemList, gemInstance)
end
if socketedItem.builtInSupport then
socketGroup.imbuedSupport = socketedItem.builtInSupport:gsub("Supported by Level 1 ", "")
self.build.skillsTab.controls.imbuedSupport.gemChangeFunc(data.gems[data.gemForBaseName[socketGroup.imbuedSupport:lower().." support"]], nil, nil, slotName)
end
end
end
end
Expand Down
3 changes: 3 additions & 0 deletions src/Classes/SkillListControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ local SkillListClass = newClass("SkillListControl", "ListControl", function(self
self.controls.deleteAll = new("ButtonControl", {"RIGHT",self.controls.delete,"LEFT"}, {-4, 0, 70, 18}, "Delete All", function()
main:OpenConfirmPopup("Delete All", "Are you sure you want to delete all socket groups in this build?", "Delete", function()
wipeTable(self.list)
skillsTab:RebuildImbuedSupportBySlot()
skillsTab:SetDisplayGroup()
skillsTab:AddUndoState()
skillsTab.build.buildFlag = true
Expand Down Expand Up @@ -165,6 +166,7 @@ function SkillListClass:OnSelDelete(index, socketGroup)
main:OpenMessagePopup("Delete Socket Group", "This socket group cannot be deleted as it is created by an equipped item.")
elseif not socketGroup.gemList[1] then
t_remove(self.list, index)
self.skillsTab:RebuildImbuedSupportBySlot()
if self.skillsTab.displayGroup == socketGroup then
self.skillsTab.displayGroup = nil
end
Expand All @@ -175,6 +177,7 @@ function SkillListClass:OnSelDelete(index, socketGroup)
else
main:OpenConfirmPopup("Delete Socket Group", "Are you sure you want to delete '"..socketGroup.displayLabel.."'?", "Delete", function()
t_remove(self.list, index)
self.skillsTab:RebuildImbuedSupportBySlot()
if self.skillsTab.displayGroup == socketGroup then
self.skillsTab:SetDisplayGroup()
end
Expand Down
Loading
Loading