From 4b0c8e03f8761469bf759629f5b57b774aeeedb2 Mon Sep 17 00:00:00 2001 From: cupkax Date: Sat, 29 Aug 2026 20:17:13 +0000 Subject: [PATCH 1/2] Apply changes from https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/10091 --- src/Classes/ConfigTab.lua.rej | 10 ++++++++++ src/Modules/ConfigOptions.lua | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 src/Classes/ConfigTab.lua.rej diff --git a/src/Classes/ConfigTab.lua.rej b/src/Classes/ConfigTab.lua.rej new file mode 100644 index 0000000000..638071b6a5 --- /dev/null +++ b/src/Classes/ConfigTab.lua.rej @@ -0,0 +1,10 @@ +diff a/src/Classes/ConfigTab.lua b/src/Classes/ConfigTab.lua (rejected hunks) +@@ -162,7 +162,7 @@ local ConfigTabClass = newClass("ConfigTab", "UndoHandler", "ControlHost", "Cont + self.build.buildFlag = true + end) + elseif varData.type == "count" or varData.type == "integer" or varData.type == "countAllowZero" or varData.type == "float" then +- control = new("EditControl", {"TOPLEFT",lastSection,"TOPLEFT"}, {234, 0, 90, 18}, "", nil, (varData.type == "integer" and "^%-%d") or (varData.type == "float" and "^%d.") or "%D", 10, function(buf, placeholder) ++ control = new("EditControl", {"TOPLEFT",lastSection,"TOPLEFT"}, {234, 0, 90, 18}, "", nil, ((varData.type == "integer" or varData.type == "countAllowZero") and "^%-%d") or (varData.type == "float" and "^%d.") or "%D", 10, function(buf, placeholder) + if placeholder then + self.configSets[self.activeConfigSetId].placeholder[varData.var] = tonumber(buf) + else diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index c862007847..4b32328858 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -2144,16 +2144,16 @@ Huge sets the radius to 11. { var = "enemyPhysicalReduction", type = "integer", label = "Enemy Phys. Damage Reduction:", apply = function(val, modList, enemyModList) enemyModList:NewMod("PhysicalDamageReduction", "BASE", val, "EnemyConfig") end }, - { var = "enemyLightningResist", type = "integer", label = "Enemy ^xADAA47Lightning Resistance:", apply = function(val, modList, enemyModList) + { var = "enemyLightningResist", type = "countAllowZero", label = "Enemy ^xADAA47Lightning Resistance:", apply = function(val, modList, enemyModList) enemyModList:NewMod("LightningResist", "BASE", val, "EnemyConfig") end }, - { var = "enemyColdResist", type = "integer", label = "Enemy ^x3F6DB3Cold Resistance:", apply = function(val, modList, enemyModList) + { var = "enemyColdResist", type = "countAllowZero", label = "Enemy ^x3F6DB3Cold Resistance:", apply = function(val, modList, enemyModList) enemyModList:NewMod("ColdResist", "BASE", val, "EnemyConfig") end }, - { var = "enemyFireResist", type = "integer", label = "Enemy ^xB97123Fire Resistance:", apply = function(val, modList, enemyModList) + { var = "enemyFireResist", type = "countAllowZero", label = "Enemy ^xB97123Fire Resistance:", apply = function(val, modList, enemyModList) enemyModList:NewMod("FireResist", "BASE", val, "EnemyConfig") end }, - { var = "enemyChaosResist", type = "integer", label = "Enemy ^xD02090Chaos Resistance:", apply = function(val, modList, enemyModList) + { var = "enemyChaosResist", type = "countAllowZero", label = "Enemy ^xD02090Chaos Resistance:", apply = function(val, modList, enemyModList) enemyModList:NewMod("ChaosResist", "BASE", val, "EnemyConfig") end }, { var = "enemyMaxResist", type = "check", label = "Enemy Max Resistance is always 75%", tooltip = "Enemy Maximum resistance is increased by the resistance configurations \nThis locks it at the default value", apply = function(val, modList, enemyModList) From e8f24647e03f2dd7e57048d36a177ff3a6278d01 Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Sun, 30 Aug 2026 08:03:20 +1000 Subject: [PATCH 2/2] Fix port --- src/Classes/ConfigTab.lua | 2 +- src/Classes/ConfigTab.lua.rej | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 src/Classes/ConfigTab.lua.rej diff --git a/src/Classes/ConfigTab.lua b/src/Classes/ConfigTab.lua index 3d6a27badf..cd6fa20146 100644 --- a/src/Classes/ConfigTab.lua +++ b/src/Classes/ConfigTab.lua @@ -312,7 +312,7 @@ function ConfigTabClass:ConfigTab(build) self.build.buildFlag = true end) elseif varData.type == "count" or varData.type == "integer" or varData.type == "countAllowZero" or varData.type == "float" then - control = new("EditControl"):EditControl({ "TOPLEFT", lastSection, "TOPLEFT" }, { 234, 0, 90, 18 }, "", nil, (varData.type == "integer" and "^%-%d") or (varData.type == "float" and "^%d.") or "%D", 7, function(buf, placeholder) + control = new("EditControl"):EditControl({ "TOPLEFT", lastSection, "TOPLEFT" }, { 234, 0, 90, 18 }, "", nil, ((varData.type == "integer" or varData.type == "countAllowZero") and "^%-%d") or (varData.type == "float" and "^%d.") or "%D", 7, function(buf, placeholder) if placeholder then self.configSets[self.activeConfigSetId].placeholder[varData.var] = tonumber(buf) else diff --git a/src/Classes/ConfigTab.lua.rej b/src/Classes/ConfigTab.lua.rej deleted file mode 100644 index 638071b6a5..0000000000 --- a/src/Classes/ConfigTab.lua.rej +++ /dev/null @@ -1,10 +0,0 @@ -diff a/src/Classes/ConfigTab.lua b/src/Classes/ConfigTab.lua (rejected hunks) -@@ -162,7 +162,7 @@ local ConfigTabClass = newClass("ConfigTab", "UndoHandler", "ControlHost", "Cont - self.build.buildFlag = true - end) - elseif varData.type == "count" or varData.type == "integer" or varData.type == "countAllowZero" or varData.type == "float" then -- control = new("EditControl", {"TOPLEFT",lastSection,"TOPLEFT"}, {234, 0, 90, 18}, "", nil, (varData.type == "integer" and "^%-%d") or (varData.type == "float" and "^%d.") or "%D", 10, function(buf, placeholder) -+ control = new("EditControl", {"TOPLEFT",lastSection,"TOPLEFT"}, {234, 0, 90, 18}, "", nil, ((varData.type == "integer" or varData.type == "countAllowZero") and "^%-%d") or (varData.type == "float" and "^%d.") or "%D", 10, function(buf, placeholder) - if placeholder then - self.configSets[self.activeConfigSetId].placeholder[varData.var] = tonumber(buf) - else