Skip to content

Commit bff74c2

Browse files
authored
Hide graft slots if not 3.27 tree (#9491)
1 parent 3be64fb commit bff74c2

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/Classes/ItemsTab.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ local socketDropList = {
3030
{ label = colorCodes.SCION.."W", color = "W" }
3131
}
3232

33-
local baseSlots = { "Weapon 1", "Weapon 2", "Helmet", "Body Armour", "Gloves", "Boots", "Amulet", "Ring 1", "Ring 2", "Ring 3", "Belt", "Flask 1", "Flask 2", "Flask 3", "Flask 4", "Flask 5", "Graft 1", "Graft 2" }
33+
local baseSlots = { "Weapon 1", "Weapon 2", "Helmet", "Body Armour", "Gloves", "Boots", "Amulet", "Ring 1", "Ring 2", "Ring 3", "Belt", "Graft 1", "Graft 2", "Flask 1", "Flask 2", "Flask 3", "Flask 4", "Flask 5" }
3434

3535
local influenceInfo = itemLib.influenceInfo.all
3636

@@ -145,6 +145,10 @@ local ItemsTabClass = newClass("ItemsTab", "UndoHandler", "ControlHost", "Contro
145145
end
146146
swapSlot.abyssalSocketList[i] = abyssal
147147
end
148+
elseif slotName == "Graft 1" or slotName == "Graft 2" then
149+
slot.shown = function()
150+
return self.build.spec.treeVersion:find("3_27")
151+
end
148152
elseif slotName == "Ring 3" then
149153
slot.shown = function()
150154
return self.build.calcsTab.mainEnv.modDB:Flag(nil, "AdditionalRingSlot")

src/Modules/CalcSetup.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,11 @@ function calcs.initEnv(build, mode, override, specEnv)
679679
local jewelLimits = {}
680680
for _, slot in pairs(build.itemsTab.orderedSlots) do
681681
local slotName = slot.slotName
682+
if slotName == "Graft 1" or slotName == "Graft 2" then
683+
if not build.spec.treeVersion:find("3_27") then
684+
goto continue
685+
end
686+
end
682687
local item
683688
if slotName == override.repSlotName then
684689
item = override.repItem

0 commit comments

Comments
 (0)