diff --git a/spec/System/TestTradeQueryGenerator_spec.lua.rej b/spec/System/TestTradeQueryGenerator_spec.lua.rej new file mode 100644 index 0000000000..bbcfd46a1c --- /dev/null +++ b/spec/System/TestTradeQueryGenerator_spec.lua.rej @@ -0,0 +1,20 @@ +diff a/spec/System/TestTradeQueryGenerator_spec.lua b/spec/System/TestTradeQueryGenerator_spec.lua (rejected hunks) +@@ -46,6 +46,18 @@ describe("TradeQueryGenerator", function() + end) + end) + ++ describe("Eldritch mods", function() ++ it("shows the Eldritch options for amulets", function() ++ local queryGen = new("TradeQueryGenerator"):TradeQueryGenerator({ itemsTab = { items = { } } }) ++ queryGen:RequestQuery({ slotName = "Amulet" }, { ++ slotTbl = { slotName = "Amulet", alreadyCorrupted = false }, ++ }, { }, function() end) ++ ++ assert.is_not_nil(main.popups[1].controls.includeEldritch) ++ main:ClosePopup() ++ end) ++ end) ++ + describe("WeightedRatioOutputs", function() + local maxStatIncrease + diff --git a/src/Classes/Control.lua b/src/Classes/Control.lua index 110eb6884e..d68cf3e55d 100644 --- a/src/Classes/Control.lua +++ b/src/Classes/Control.lua @@ -64,7 +64,10 @@ end function ControlClass:GetPos() if self.anchor.collapse and self.anchor.other and not self.anchor.other:GetProperty("shown") then - return self.anchor.other:GetPos() + local x, y = self.anchor.other:GetPos() + x = x + (self.collapseX or 0) + y = y + (self.collapseY or 0) + return x, y end local x = self:GetProperty("x") local y = self:GetProperty("y") diff --git a/src/Classes/Control.lua.rej b/src/Classes/Control.lua.rej new file mode 100644 index 0000000000..acfebf24d4 --- /dev/null +++ b/src/Classes/Control.lua.rej @@ -0,0 +1,10 @@ +diff a/src/Classes/Control.lua b/src/Classes/Control.lua (rejected hunks) +@@ -41,6 +41,8 @@ local rect = { + ---@field shown Prop + ---@field x Prop? + ---@field y Prop? ++---@field collapseY number? An additional offset which is applied when this control uses a collapsed anchor. ++---@field collapseX number? An additional offset which is applied when this control uses a collapsed anchor. + local ControlClass = newClass("Control") + + ---@alias ControlAnchor [AnchorPoint, Control|ControlHost, AnchorPoint, boolean|nil] diff --git a/src/Classes/TradeQueryGenerator.lua b/src/Classes/TradeQueryGenerator.lua index 415a668a0f..5b6091f6e7 100644 --- a/src/Classes/TradeQueryGenerator.lua +++ b/src/Classes/TradeQueryGenerator.lua @@ -861,6 +861,7 @@ Implicits: 0]] options = options, slot = slot, requiredMods = options.requiredMods, + blockedMods = options.blockedMods } -- OnFrame will pick this up and begin the work @@ -960,8 +961,8 @@ function TradeQueryGeneratorClass:FinishQuery() } local selectedTradeType = self.tradeTypes[self.tradeTypeIndex] -- Generate trade query str and open in browser - local filters = 0 local requiredMods = self.calcContext.requiredMods or {} + local blockedMods = self.calcContext.blockedMods or {} local queryTable = { query = { filters = self.calcContext.special.queryFilters or { @@ -1048,6 +1049,7 @@ function TradeQueryGeneratorClass:FinishQuery() end if options.maxPrice and options.maxPrice > 0 then + complexityBudget = complexityBudget - 3 queryTable.query.filters.trade_filters = { filters = { price = { diff --git a/src/Classes/TradeQueryGenerator.lua.rej b/src/Classes/TradeQueryGenerator.lua.rej new file mode 100644 index 0000000000..2425f83e17 --- /dev/null +++ b/src/Classes/TradeQueryGenerator.lua.rej @@ -0,0 +1,11 @@ +diff a/src/Classes/TradeQueryGenerator.lua b/src/Classes/TradeQueryGenerator.lua (rejected hunks) +@@ -137,7 +137,8 @@ local eldritchModSlots = { + ["Body Armour"] = true, + ["Helmet"] = true, + ["Gloves"] = true, +- ["Boots"] = true ++ ["Boots"] = true, ++ ["Amulet"] = true + } + + local function logToFile(...)