Skip to content

Commit bf890a6

Browse files
author
LocalIdentity
committed
Merge branch 'dev'
2 parents ab3c122 + 7669294 commit bf890a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+11662
-9148
lines changed

Classes/CalcBreakdownControl.lua

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ function CalcBreakdownClass:SetBreakdownData(displayData, pinned)
7070
if section.type == "TEXT" then
7171
section.width = 0
7272
for _, line in ipairs(section.lines) do
73-
section.width = m_max(section.width, DrawStringWidth(section.textSize, "VAR", line) + 8)
73+
local _, num = string.gsub(line, "%d%d%d%d", "") -- count how many commas will be added
74+
if main.showThousandsCalcs and num > 0 then
75+
section.width = m_max(section.width, DrawStringWidth(section.textSize, "VAR", line) + 8 + (4 * num))
76+
else
77+
section.width = m_max(section.width, DrawStringWidth(section.textSize, "VAR", line) + 8)
78+
end
7479
end
7580
section.height = #section.lines * section.textSize + 4
7681
elseif section.type == "TABLE" then
@@ -79,20 +84,27 @@ function CalcBreakdownClass:SetBreakdownData(displayData, pinned)
7984
for _, col in pairs(section.colList) do
8085
for _, row in pairs(section.rowList) do
8186
if row[col.key] then
82-
col.width = m_max(col.width or 0, DrawStringWidth(16, "VAR", col.label) + 6, DrawStringWidth(12, "VAR", row[col.key]) + 6)
87+
local _, num = string.gsub(row[col.key], "%d%d%d%d", "") -- count how many commas will be added
88+
if main.showThousandsCalcs and num > 0 then
89+
col.width = m_max(col.width or 0, DrawStringWidth(16, "VAR", col.label) + 6, DrawStringWidth(12, "VAR", row[col.key]) + 6 + (4 * num))
90+
else
91+
col.width = m_max(col.width or 0, DrawStringWidth(16, "VAR", col.label) + 6, DrawStringWidth(12, "VAR", row[col.key]) + 6)
92+
end
8393
end
8494
end
8595
if col.width then
8696
section.width = section.width + col.width
8797
end
8898
end
89-
if section.label then
90-
section.width = m_max(section.width, 6 + DrawStringWidth(16, "VAR", section.label..":"))
91-
end
9299
section.height = #section.rowList * 14 + 20
93100
if section.label then
101+
self.contentWidth = m_max(self.contentWidth, 6 + DrawStringWidth(16, "VAR", section.label..":"))
94102
section.height = section.height + 16
95103
end
104+
if section.footer then
105+
self.contentWidth = m_max(self.contentWidth, 6 + DrawStringWidth(12, "VAR", section.footer))
106+
section.height = section.height + 12
107+
end
96108
end
97109
self.contentWidth = m_max(self.contentWidth, section.width)
98110
section.offset = offset
@@ -139,6 +151,7 @@ function CalcBreakdownClass:AddBreakdownSection(sectionData)
139151
local section = {
140152
type = "TABLE",
141153
label = breakdown.label,
154+
footer = breakdown.footer,
142155
rowList = breakdown.rowList,
143156
colList = breakdown.colList,
144157
}
@@ -506,7 +519,7 @@ function CalcBreakdownClass:DrawBreakdownTable(viewPort, x, y, section)
506519
if index > 1 then
507520
-- Skip the separator for the first column
508521
SetDrawColor(0.5, 0.5, 0.5)
509-
DrawImage(nil, colX - 2, y, 1, section.label and section.height - 16 or section.height)
522+
DrawImage(nil, colX - 2, y, 1, section.height - (section.label and 16 or 0) - (section.footer and 12 or 0))
510523
end
511524
SetDrawColor(1, 1, 1)
512525
DrawString(colX, y + 2, "LEFT", 16, "VAR", col.label)
@@ -521,8 +534,15 @@ function CalcBreakdownClass:DrawBreakdownTable(viewPort, x, y, section)
521534
for _, col in ipairs(section.colList) do
522535
if col.width and row[col.key] then
523536
-- This row has an entry for this column, draw it
524-
if col.right then
537+
local _, alpha = string.gsub(row[col.key], "%a", " ") -- counts letters in the string
538+
local _, notes = string.gsub(row[col.key], " to ", " ") -- counts " to " in the string
539+
local _, paren = string.gsub(row[col.key], "%b()", " ") -- counts parenthesis in the string
540+
if main.showThousandsCalcs and (alpha == 0 or notes > 0 or paren > 0) and col.right then
541+
DrawString(col.x + col.width - 4, rowY + 1, "RIGHT_X", 12, "VAR", "^7"..formatNumSep(tostring(row[col.key])))
542+
elseif col.right then
525543
DrawString(col.x + col.width - 4, rowY + 1, "RIGHT_X", 12, "VAR", "^7"..row[col.key])
544+
elseif main.showThousandsCalcs and (alpha == 0 or notes > 0 or paren > 0) then
545+
DrawString(col.x, rowY + 1, "LEFT", 12, "VAR", "^7"..formatNumSep(tostring(row[col.key])))
526546
else
527547
DrawString(col.x, rowY + 1, "LEFT", 12, "VAR", "^7"..row[col.key])
528548
end
@@ -564,6 +584,10 @@ function CalcBreakdownClass:DrawBreakdownTable(viewPort, x, y, section)
564584
end
565585
rowY = rowY + 14
566586
end
587+
if section.footer then
588+
-- Draw table footer if able
589+
DrawString(x + 2, rowY, "LEFT", 12, "VAR", "^7"..section.footer)
590+
end
567591
end
568592

569593
function CalcBreakdownClass:DrawRadiusVisual(x, y, width, height, radius)
@@ -650,7 +674,12 @@ function CalcBreakdownClass:Draw(viewPort)
650674
local lineY = sectionY + 2
651675
for i, line in ipairs(section.lines) do
652676
SetDrawColor(1, 1, 1)
653-
DrawString(x + 4, lineY, "LEFT", section.textSize, "VAR", line)
677+
local _, dec = string.gsub(line, "%.%d%d.", " ") -- counts decimals with 2 or more digits
678+
if main.showThousandsCalcs and dec == 0 then
679+
DrawString(x + 4, lineY, "LEFT", section.textSize, "VAR", formatNumSep(line))
680+
else
681+
DrawString(x + 4, lineY, "LEFT", section.textSize, "VAR", line)
682+
end
654683
lineY = lineY + section.textSize
655684
end
656685
elseif section.type == "TABLE" then

Classes/CalcsTab.lua

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,11 @@ function CalcsTabClass:PowerBuilder()
453453
local cache = { }
454454
local newPowerMax = {
455455
singleStat = 0,
456+
singleStatPerPoint = 0,
456457
offence = 0,
457-
defence = 0
458+
offencePerPoint = 0,
459+
defence = 0,
460+
defencePerPoint = 0
458461
}
459462
if not self.powerMax then
460463
self.powerMax = newPowerMax
@@ -472,8 +475,10 @@ function CalcsTabClass:PowerBuilder()
472475
local output = cache[node.modKey]
473476
if self.powerStat and self.powerStat.stat and not self.powerStat.ignoreForNodes then
474477
node.power.singleStat = self:CalculatePowerStat(self.powerStat, output, calcBase)
475-
if node.path then
478+
if (node.path or node.recipe) and not node.ascendancyName then
476479
newPowerMax.singleStat = m_max(newPowerMax.singleStat, node.power.singleStat)
480+
local pathCost = node.path and #node.path or 1
481+
newPowerMax.singleStatPerPoint = m_max(node.power.singleStat / pathCost, newPowerMax.singleStatPerPoint)
477482
end
478483
else
479484
if calcBase.Minion then
@@ -487,9 +492,13 @@ function CalcsTabClass:PowerBuilder()
487492
(output.Evasion - calcBase.Evasion) / m_max(10000, calcBase.Evasion) +
488493
(output.LifeRegen - calcBase.LifeRegen) / 500 +
489494
(output.EnergyShieldRegen - calcBase.EnergyShieldRegen) / 1000
490-
if node.path then
495+
if (node.path or node.recipe) and not node.ascendancyName then
491496
newPowerMax.offence = m_max(newPowerMax.offence, node.power.offence)
492497
newPowerMax.defence = m_max(newPowerMax.defence, node.power.defence)
498+
local pathCost = node.path and #node.path or 1
499+
newPowerMax.offencePerPoint = m_max(newPowerMax.offencePerPoint, node.power.offence / pathCost)
500+
newPowerMax.defencePerPoint = m_max(newPowerMax.defencePerPoint, node.power.defence / pathCost)
501+
493502
end
494503
end
495504
end

Classes/ItemDBControl.lua

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ local ItemDBClass = newClass("ItemDBControl", "ListControl", function(self, anch
5151
t_insert(self.typeList, 4, "One Handed Melee")
5252
t_insert(self.typeList, 5, "Two Handed Melee")
5353
self.slotList = { "Any slot", "Weapon 1", "Weapon 2", "Helmet", "Body Armour", "Gloves", "Boots", "Amulet", "Ring", "Belt", "Jewel" }
54-
local baseY = dbType == "RARE" and -22 or -42
54+
local baseY = dbType == "RARE" and -22 or -62
5555
self.controls.slot = new("DropDownControl", {"BOTTOMLEFT",self,"TOPLEFT"}, 0, baseY, 179, 18, self.slotList, function(index, value)
5656
self.listBuildFlag = true
5757
end)
@@ -65,6 +65,9 @@ local ItemDBClass = newClass("ItemDBControl", "ListControl", function(self, anch
6565
self.controls.league = new("DropDownControl", {"LEFT",self.controls.sort,"RIGHT"}, 2, 0, 179, 18, self.leagueList, function(index, value)
6666
self.listBuildFlag = true
6767
end)
68+
self.controls.requirement = new("DropDownControl", {"LEFT",self.controls.sort,"BOTTOMLEFT"}, 0, 11, 179, 18, { "Any requirements", "Current level", "Current attributes", "Current useable" }, function(index, value)
69+
self.listBuildFlag = true
70+
end)
6871
end
6972
self.controls.search = new("EditControl", {"BOTTOMLEFT",self,"TOPLEFT"}, 0, -2, 258, 18, "", "Search", "%c", 100, function()
7073
self.listBuildFlag = true
@@ -107,6 +110,14 @@ function ItemDBClass:DoesItemMatchFilters(item)
107110
return false
108111
end
109112
end
113+
if self.dbType == "UNIQUE" and self.controls.requirement.selIndex > 1 then
114+
if (self.controls.requirement.selIndex == 2 or self.controls.requirement.selIndex == 4) and item.requirements.level and item.requirements.level > self.itemsTab.build.characterLevel then
115+
return false
116+
end
117+
if self.controls.requirement.selIndex > 2 and item.requirements and (item.requirements.str > self.itemsTab.build.calcsTab.mainOutput.Str or item.requirements.dex > self.itemsTab.build.calcsTab.mainOutput.Dex or item.requirements.int > self.itemsTab.build.calcsTab.mainOutput.Int) then
118+
return false
119+
end
120+
end
110121
local searchStr = self.controls.search.buf:lower()
111122
if searchStr:match("%S") then
112123
local found = false

Classes/ItemsTab.lua

Lines changed: 72 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ local ItemsTabClass = newClass("ItemsTab", "UndoHandler", "ControlHost", "Contro
201201
-- Unique database
202202
self.controls.uniqueDB = new("ItemDBControl", {"TOPLEFT",self.controls.itemList,"BOTTOMLEFT"}, 0, 76, 360, function(c) return m_min(244, self.maxY - select(2, c:GetPos())) end, self, main.uniqueDB[build.targetVersion], "UNIQUE")
203203
self.controls.uniqueDB.y = function()
204-
return self.controls.selectDBLabel:IsShown() and 98 or 76
204+
return self.controls.selectDBLabel:IsShown() and 118 or 96
205205
end
206206
self.controls.uniqueDB.shown = function()
207207
return not self.controls.selectDBLabel:IsShown() or self.controls.selectDB.selIndex == 1
@@ -210,7 +210,7 @@ local ItemsTabClass = newClass("ItemsTab", "UndoHandler", "ControlHost", "Contro
210210
-- Rare template database
211211
self.controls.rareDB = new("ItemDBControl", {"TOPLEFT",self.controls.itemList,"BOTTOMLEFT"}, 0, 76, 360, function(c) return m_min(260, self.maxY - select(2, c:GetPos())) end, self, main.rareDB[build.targetVersion], "RARE")
212212
self.controls.rareDB.y = function()
213-
return self.controls.selectDBLabel:IsShown() and 78 or 376
213+
return self.controls.selectDBLabel:IsShown() and 78 or 396
214214
end
215215
self.controls.rareDB.shown = function()
216216
return not self.controls.selectDBLabel:IsShown() or self.controls.selectDB.selIndex == 2
@@ -343,7 +343,7 @@ If there's 2 slots an item can go in, holding Shift will put it in the second.]]
343343
end
344344

345345
-- Section: Enchant / Anoint / Corrupt
346-
self.controls.displayItemSectionEnchant = new("Control", {"TOPLEFT",self.controls.displayItemSectionSockets,"BOTTOMLEFT",true}, 0, 0, 0, function()
346+
self.controls.displayItemSectionEnchant = new("Control", {"TOPLEFT",self.controls.displayItemSectionSockets,"BOTTOMLEFT"}, 0, 0, 0, function()
347347
return (self.controls.displayItemEnchant:IsShown() or self.controls.displayItemEnchant2:IsShown() or self.controls.displayItemAnoint:IsShown() or self.controls.displayItemAnoint2:IsShown() or self.controls.displayItemCorrupt:IsShown() ) and 28 or 0
348348
end)
349349
self.controls.displayItemEnchant = new("ButtonControl", {"TOPLEFT",self.controls.displayItemSectionEnchant,"TOPLEFT"}, 0, 0, 160, 20, "Apply Enchantment...", function()
@@ -541,6 +541,56 @@ If there's 2 slots an item can go in, holding Shift will put it in the second.]]
541541
if mod.modTags and #mod.modTags > 0 then
542542
tooltip:AddLine(16, "Tags: "..table.concat(mod.modTags, ', '))
543543
end
544+
545+
local notableName = mod[1] and mod[1]:match("1 Added Passive Skill is (.*)")
546+
local node = notableName and self.build.spec.tree.clusterNodeMap[notableName]
547+
if node then
548+
tooltip:AddSeparator(14)
549+
550+
-- Node name
551+
self.socketViewer:AddNodeName(tooltip, node, self.build)
552+
553+
-- Node description
554+
if node.sd[1] then
555+
tooltip:AddLine(16, "")
556+
for i, line in ipairs(node.sd) do
557+
tooltip:AddLine(16, ((node.mods[i].extra or not node.mods[i].list) and colorCodes.UNSUPPORTED or colorCodes.MAGIC)..line)
558+
end
559+
end
560+
561+
-- Reminder text
562+
if node.reminderText then
563+
tooltip:AddSeparator(14)
564+
for _, line in ipairs(node.reminderText) do
565+
tooltip:AddLine(14, "^xA0A080"..line)
566+
end
567+
end
568+
569+
-- Comparison
570+
tooltip:AddSeparator(14)
571+
self:AppendAnointTooltip(tooltip, node, "Allocating")
572+
573+
-- Information of for this notable appears
574+
local clusterInfo = self.build.data.clusterJewelInfoForNotable[notableName]
575+
if clusterInfo then
576+
tooltip:AddSeparator(14)
577+
tooltip:AddLine(20, "^7"..notableName.." can appear on:")
578+
local isFirstSize = true
579+
for size, v in pairs(clusterInfo.size) do
580+
tooltip:AddLine(18, colorCodes.MAGIC..size..":")
581+
local sizeSkills = self.build.data.clusterJewels.jewels[size].skills
582+
for i, type in ipairs(clusterInfo.jewelTypes) do
583+
if sizeSkills[type] then
584+
tooltip:AddLine(14, "^7 "..sizeSkills[type].name)
585+
end
586+
end
587+
if not isFirstSize then
588+
tooltip:AddLine(10, "")
589+
end
590+
isFirstSize = false
591+
end
592+
end
593+
end
544594
else
545595
tooltip:AddLine(16, "^7"..#modList.." Tiers")
546596
local minMod = self.displayItem.affixes[modList[1]]
@@ -825,13 +875,15 @@ function ItemsTabClass:Draw(viewPort, inputEvents)
825875
self.controls.scrollBarV.y = viewPort.y
826876
do
827877
local maxY = select(2, self.lastSlot:GetPos()) + 24
878+
local maxX = self.anchorDisplayItem:GetPos() + 462
828879
if self.displayItem then
829880
local x, y = self.controls.displayItemTooltipAnchor:GetPos()
830-
local ttW, ttH = self.displayItemTooltip:GetSize()
881+
local ttW, ttH = self.displayItemTooltip:GetDynamicSize(viewPort)
831882
maxY = m_max(maxY, y + ttH + 4)
883+
maxX = m_max(maxX, x + ttW + 80)
832884
end
833885
local contentHeight = maxY - self.y
834-
local contentWidth = self.anchorDisplayItem:GetPos() + 462 - self.x
886+
local contentWidth = maxX - self.x
835887
local v = contentHeight > viewPort.height
836888
local h = contentWidth > viewPort.width - (v and 20 or 0)
837889
if h then
@@ -1270,6 +1322,11 @@ function ItemsTabClass:CraftClusterJewel()
12701322
local item = self.displayItem
12711323
wipeTable(item.enchantModLines)
12721324
t_insert(item.enchantModLines, { line = "Adds "..(item.clusterJewelNodeCount or item.clusterJewel.maxNodes).." Passive Skills", crafted = true })
1325+
if item.clusterJewel.size == "Large" then
1326+
t_insert(item.enchantModLines, { line = "2 Added Passive Skills are Jewel Sockets", crafted = true })
1327+
elseif item.clusterJewel.size == "Medium" then
1328+
t_insert(item.enchantModLines, { line = "1 Added Passive Skill is a Jewel Socket", crafted = true })
1329+
end
12731330
local skill = item.clusterJewel.skills[item.clusterJewelSkill]
12741331
t_insert(item.enchantModLines, { line = table.concat(skill.enchant, "\n"), crafted = true })
12751332
item:BuildAndParseRaw()
@@ -1798,38 +1855,42 @@ end
17981855
---Appends tooltip information for anointing a new passive tree node onto the currently editing amulet
17991856
---@param tooltip table @The tooltip to append into
18001857
---@param node table @The passive tree node that will be anointed, or nil to remove the current anoint.
1801-
function ItemsTabClass:AppendAnointTooltip(tooltip, node)
1858+
function ItemsTabClass:AppendAnointTooltip(tooltip, node, actionText)
18021859
if not self.displayItem then
18031860
return
18041861
end
18051862

1863+
if not actionText then
1864+
actionText = "Anointing"
1865+
end
1866+
18061867
local header
18071868
if node then
18081869
if self.build.spec.allocNodes[node.id] then
1809-
tooltip:AddLine(14, "^7Anointing "..node.dn.." changes nothing because this node is already allocated on the tree.")
1870+
tooltip:AddLine(14, "^7"..actionText.." "..node.dn.." changes nothing because this node is already allocated on the tree.")
18101871
return
18111872
end
18121873

18131874
local curAnoints = self:getAnoint(self.displayItem)
18141875
if curAnoints and #curAnoints > 0 then
18151876
for _, curAnoint in ipairs(curAnoints) do
18161877
if curAnoint == node.dn then
1817-
tooltip:AddLine(14, "^7Anointing "..node.dn.." changes nothing because this node is already anointed.")
1878+
tooltip:AddLine(14, "^7"..actionText.." "..node.dn.." changes nothing because this node is already anointed.")
18181879
return
18191880
end
18201881
end
18211882
end
18221883

1823-
header = "^7Anointing "..node.dn.." will give you: "
1884+
header = "^7"..actionText.." "..node.dn.." will give you: "
18241885
else
1825-
header = "^7Anointing nothing will give you: "
1886+
header = "^7"..actionText.." nothing will give you: "
18261887
end
18271888
local calcFunc = self.build.calcsTab:GetMiscCalculator()
18281889
local outputBase = calcFunc({ repSlotName = "Amulet", repItem = self.displayItem })
18291890
local outputNew = calcFunc({ repSlotName = "Amulet", repItem = self:anointItem(node) })
18301891
local numChanges = self.build:AddStatComparesToTooltip(tooltip, outputBase, outputNew, header)
18311892
if node and numChanges == 0 then
1832-
tooltip:AddLine(14, "^7Anointing "..node.dn.." changes nothing.")
1893+
tooltip:AddLine(14, "^7"..actionText.." "..node.dn.." changes nothing.")
18331894
end
18341895
end
18351896

Classes/PassiveTreeView.lua

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,17 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
470470
-- Calculate color based on a single stat
471471
local stat = m_max(node.power.singleStat or 0, 0)
472472
local statCol = (stat / build.calcsTab.powerMax.singleStat * 1.5) ^ 0.5
473+
local path = (node.alloc and node.depends) or self.tracePath or node.path or { }
474+
local pathCost = #path == 0 and 1 or #path
475+
if(stat ~= 0) then
476+
if(self.heatMapStatPerPoint and self.heatMapTopPick) then
477+
statCol = stat / pathCost == build.calcsTab.powerMax.singleStatPerPoint and 1.5 ^ 0.5 or 0
478+
elseif self.heatMapStatPerPoint then
479+
statCol = statCol / pathCost * 4
480+
elseif self.heatMapTopPick then
481+
statCol = stat == build.calcsTab.powerMax.singleStat and 1.5 ^ 0.5 or 0
482+
end
483+
end
473484
if main.nodePowerTheme == "RED/BLUE" then
474485
SetDrawColor(statCol, 0, 0)
475486
elseif main.nodePowerTheme == "RED/GREEN" then
@@ -483,6 +494,18 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
483494
local defence = m_max(node.power.defence or 0, 0)
484495
local dpsCol = (offence / build.calcsTab.powerMax.offence * 1.5) ^ 0.5
485496
local defCol = (defence / build.calcsTab.powerMax.defence * 1.5) ^ 0.5
497+
local path = (node.alloc and node.depends) or self.tracePath or node.path or { }
498+
local pathCost = #path == 0 and 1 or #path
499+
if(self.heatMapStatPerPoint and self.heatMapTopPick) then
500+
dpsCol = offence / pathCost == build.calcsTab.powerMax.offencePerPoint and 1.5 ^ 0.5 or 0
501+
defCol = defence / pathCost == build.calcsTab.powerMax.defencePerPoint and 1.5 ^ 0.5 or 0
502+
elseif self.heatMapStatPerPoint then
503+
dpsCol = dpsCol / pathCost * 4
504+
defCol = defCol / pathCost * 4
505+
elseif self.heatMapTopPick then
506+
dpsCol = offence == build.calcsTab.powerMax.offence and 1.5 ^ 0.5 or 0
507+
defCol = defence == build.calcsTab.powerMax.defence and 1.5 ^ 0.5 or 0
508+
end
486509
local mixCol = (m_max(dpsCol - 0.5, 0) + m_max(defCol - 0.5, 0)) / 2
487510
if main.nodePowerTheme == "RED/BLUE" then
488511
SetDrawColor(dpsCol, mixCol, defCol)

Classes/SkillsTab.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ local SkillsTabClass = newClass("SkillsTab", "UndoHandler", "ControlHost", "Cont
6969
self.sortGemsByDPSField = value.type
7070
end)
7171
self.controls.defaultLevel = new("EditControl", {"TOPLEFT",self.controls.groupList,"BOTTOMLEFT"}, 150, 94, 60, 20, nil, nil, "%D", 2, function(buf)
72-
self.defaultGemLevel = m_min(tonumber(buf), 21)
72+
self.defaultGemLevel = m_min(tonumber(buf) or 20, 21)
7373
end)
7474
self.controls.defaultLevelLabel = new("LabelControl", {"RIGHT",self.controls.defaultLevel,"LEFT"}, -4, 0, 0, 16, "^7Default gem level:")
7575
self.controls.defaultQuality = new("EditControl", {"TOPLEFT",self.controls.groupList,"BOTTOMLEFT"}, 150, 118, 60, 20, nil, nil, "%D", 2, function(buf)
76-
self.defaultGemQuality = m_min(tonumber(buf), 23)
76+
self.defaultGemQuality = m_min(tonumber(buf) or 0, 23)
7777
end)
7878
self.controls.defaultQualityLabel = new("LabelControl", {"RIGHT",self.controls.defaultQuality,"LEFT"}, -4, 0, 0, 16, "^7Default gem quality:")
7979
self.controls.showSupportGemTypes = new("DropDownControl", {"TOPLEFT",self.controls.groupList,"BOTTOMLEFT"}, 150, 142, 120, 20, showSupportGemTypeList, function(index, value)

0 commit comments

Comments
 (0)