Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions spec/System/TestTradeQueryGenerator_spec.lua.rej
Original file line number Diff line number Diff line change
@@ -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

5 changes: 4 additions & 1 deletion src/Classes/Control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
10 changes: 10 additions & 0 deletions src/Classes/Control.lua.rej
Original file line number Diff line number Diff line change
@@ -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<boolean>
---@field x Prop<number>?
---@field y Prop<number>?
+---@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]
4 changes: 3 additions & 1 deletion src/Classes/TradeQueryGenerator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 = {
Expand Down
11 changes: 11 additions & 0 deletions src/Classes/TradeQueryGenerator.lua.rej
Original file line number Diff line number Diff line change
@@ -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(...)