Skip to content

Commit 3890daa

Browse files
committed
Fix newlines in querymods.lua
1 parent 5226fc7 commit 3890daa

3 files changed

Lines changed: 75 additions & 65 deletions

File tree

src/Classes/TradeQueryGenerator.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,12 @@ function TradeQueryGeneratorClass:InitMods()
424424
found = true
425425
mod = v
426426
mod.type = "Implicit"
427+
-- it is possible for there to be multiple matches. For example "+(20-30) to
428+
-- maximum Energy Shield" tends to match both the amulet implicit and some
429+
-- other unique mod which is local energy shield instead. in that case it
430+
-- incorrectly gets mapped to the local stat. this is however super rare as
431+
-- it needs the ranges to match exactly.
432+
break
427433
end
428434
end
429435
end

src/Data/QueryMods.lua

Lines changed: 67 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- This file is automatically generated, do not edit!
22
-- Stat data (c) Grinding Gear Games
33

4-
-- This file contains categories of stats, mapped from trade hash to details
4+
-- This file contains categories of from trade hash to details
55
-- relevant for generating search weights Note that the trade site requires a
66
-- prefix of e.g. explicit.stat_{hash}. See
77
-- https://www.pathofexile.com/api/trade2/data/stats for a list of all trade
@@ -19613,10 +19613,10 @@ return {
1961319613
["usePositiveSign"] = true,
1961419614
},
1961519615
["101878827"] = {
19616-
["1HWeapon"] = {
19617-
["max"] = 30,
19618-
["min"] = 30,
19619-
},
19616+
["Sceptre"] = {
19617+
["max"] = 30,
19618+
["min"] = 30,
19619+
},
1962019620
["specialCaseData"] = {
1962119621
},
1962219622
["tradeMod"] = {
@@ -19914,10 +19914,10 @@ return {
1991419914
["usePositiveSign"] = true,
1991519915
},
1991619916
["1250712710"] = {
19917-
["1HWeapon"] = {
19918-
["max"] = 14,
19919-
["min"] = 14,
19920-
},
19917+
["Sceptre"] = {
19918+
["max"] = 14,
19919+
["min"] = 14,
19920+
},
1992119921
["specialCaseData"] = {
1992219922
},
1992319923
["tradeMod"] = {
@@ -20305,10 +20305,10 @@ return {
2030520305
},
2030620306
},
2030720307
["1574590649"] = {
20308-
["1HWeapon"] = {
20309-
["max"] = 15,
20310-
["min"] = 15,
20311-
},
20308+
["Sceptre"] = {
20309+
["max"] = 15,
20310+
["min"] = 15,
20311+
},
2031220312
["specialCaseData"] = {
2031320313
},
2031420314
["tradeMod"] = {
@@ -20449,10 +20449,10 @@ return {
2044920449
},
2045020450
},
2045120451
["1798257884"] = {
20452-
["1HWeapon"] = {
20453-
["max"] = 30,
20454-
["min"] = 30,
20455-
},
20452+
["Sceptre"] = {
20453+
["max"] = 30,
20454+
["min"] = 30,
20455+
},
2045620456
["specialCaseData"] = {
2045720457
},
2045820458
["tradeMod"] = {
@@ -20515,10 +20515,10 @@ return {
2051520515
},
2051620516
},
2051720517
["1998951374"] = {
20518-
["1HWeapon"] = {
20519-
["max"] = 8,
20520-
["min"] = 8,
20521-
},
20518+
["Sceptre"] = {
20519+
["max"] = 8,
20520+
["min"] = 8,
20521+
},
2052220522
["specialCaseData"] = {
2052320523
},
2052420524
["tradeMod"] = {
@@ -20872,11 +20872,12 @@ return {
2087220872
["specialCaseData"] = {
2087320873
},
2087420874
["tradeMod"] = {
20875-
["id"] = "rune.stat_2241849004",
20876-
["text"] = "Energy Shield Recharge starts after spending a total of 2000 Mana, no more than once every 2 seconds",
20877-
["type"] = "augment",
20878-
},
20879-
},
20875+
["id"] = "rune.stat_2241849004",
20876+
["text"] = "Energy Shield Recharge starts after spending a total of
20877+
2000 Mana, no more than once every 2 seconds",
20878+
["type"] = "augment",
20879+
},
20880+
},
2088020881
["2250533757"] = {
2088120882
["Boots"] = {
2088220883
["max"] = 5,
@@ -21088,11 +21089,12 @@ return {
2108821089
["specialCaseData"] = {
2108921090
},
2109021091
["tradeMod"] = {
21091-
["id"] = "rune.stat_2703838669",
21092-
["text"] = "#% increased Movement Speed per 15 Spirit, up to a maximum of 40%Other Modifiers to Movement Speed except for Sprinting do not apply",
21093-
["type"] = "augment",
21094-
},
21095-
},
21092+
["id"] = "rune.stat_2703838669",
21093+
["text"] = "#% increased Movement Speed per 15 Spirit, up to a maximum of 40%
21094+
Other Modifiers to Movement Speed except for Sprinting do not apply",
21095+
["type"] = "augment",
21096+
},
21097+
},
2109621098
["2709367754"] = {
2109721099
["Gloves"] = {
2109821100
["max"] = 1,
@@ -21147,10 +21149,10 @@ return {
2114721149
},
2114821150
},
2114921151
["2854751904"] = {
21150-
["1HWeapon"] = {
21151-
["max"] = 20.5,
21152-
["min"] = 20.5,
21153-
},
21152+
["Sceptre"] = {
21153+
["max"] = 20.5,
21154+
["min"] = 20.5,
21155+
},
2115421156
["specialCaseData"] = {
2115521157
},
2115621158
["tradeMod"] = {
@@ -21186,10 +21188,10 @@ return {
2118621188
},
2118721189
},
2118821190
["289128254"] = {
21189-
["1HWeapon"] = {
21190-
["max"] = 8,
21191-
["min"] = 8,
21192-
},
21191+
["Sceptre"] = {
21192+
["max"] = 8,
21193+
["min"] = 8,
21194+
},
2119321195
["specialCaseData"] = {
2119421196
},
2119521197
["tradeMod"] = {
@@ -21575,10 +21577,10 @@ return {
2157521577
},
2157621578
},
2157721579
["3057012405"] = {
21578-
["1HWeapon"] = {
21579-
["max"] = 14,
21580-
["min"] = 14,
21581-
},
21580+
["Sceptre"] = {
21581+
["max"] = 14,
21582+
["min"] = 14,
21583+
},
2158221584
["specialCaseData"] = {
2158321585
},
2158421586
["tradeMod"] = {
@@ -22362,10 +22364,10 @@ return {
2236222364
},
2236322365
},
2236422366
["3742865955"] = {
22365-
["1HWeapon"] = {
22366-
["max"] = 40,
22367-
["min"] = 40,
22368-
},
22367+
["Sceptre"] = {
22368+
["max"] = 40,
22369+
["min"] = 40,
22370+
},
2236922371
["Staff"] = {
2237022372
["max"] = 40,
2237122373
["min"] = 40,
@@ -22442,10 +22444,10 @@ return {
2244222444
},
2244322445
},
2244422446
["3850614073"] = {
22445-
["1HWeapon"] = {
22446-
["max"] = 8,
22447-
["min"] = 8,
22448-
},
22447+
["Sceptre"] = {
22448+
["max"] = 8,
22449+
["min"] = 8,
22450+
},
2244922451
["specialCaseData"] = {
2245022452
},
2245122453
["tradeMod"] = {
@@ -22700,10 +22702,10 @@ return {
2270022702
["usePositiveSign"] = true,
2270122703
},
2270222704
["3984865854"] = {
22703-
["1HWeapon"] = {
22704-
["max"] = 10,
22705-
["min"] = 10,
22706-
},
22705+
["Sceptre"] = {
22706+
["max"] = 10,
22707+
["min"] = 10,
22708+
},
2270722709
["specialCaseData"] = {
2270822710
},
2270922711
["tradeMod"] = {
@@ -22713,10 +22715,10 @@ return {
2271322715
},
2271422716
},
2271522717
["4010677958"] = {
22716-
["1HWeapon"] = {
22717-
["max"] = 8,
22718-
["min"] = 8,
22719-
},
22718+
["Sceptre"] = {
22719+
["max"] = 8,
22720+
["min"] = 8,
22721+
},
2272022722
["specialCaseData"] = {
2272122723
},
2272222724
["tradeMod"] = {
@@ -23003,11 +23005,12 @@ return {
2300323005
["specialCaseData"] = {
2300423006
},
2300523007
["tradeMod"] = {
23006-
["id"] = "rune.stat_4282982513",
23007-
["text"] = "Increases and Reductions to Movement Speed also apply to Energy Shield Recharge Rate",
23008-
["type"] = "augment",
23009-
},
23010-
},
23008+
["id"] = "rune.stat_4282982513",
23009+
["text"] = "Increases and Reductions to Movement Speed also
23010+
apply to Energy Shield Recharge Rate",
23011+
["type"] = "augment",
23012+
},
23013+
},
2301123014
["458438597"] = {
2301223015
["Chest"] = {
2301323016
["max"] = 15,

src/Modules/Common.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,8 @@ end
893893
---@return string
894894
function stringify(thing)
895895
if type(thing) == 'string' then
896-
return thing
896+
local s = thing:gsub("\n", "")
897+
return s
897898
elseif type(thing) == 'number' then
898899
return ""..thing;
899900
elseif type(thing) == 'table' then

0 commit comments

Comments
 (0)