diff --git a/.vscode/settings.json b/.vscode/settings.json index 573076a5..bfc14a87 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,7 +13,6 @@ "source.organizeImports": "never" } }, - "jest.jestCommandLine": "pnpm test --", "jest.runMode": "on-demand", "cSpell.enabledLanguageIds": ["jsonc", "json", "markdown"], "cSpell.allowCompoundWords": true, diff --git a/api/stately/loadouts-queries.ts b/api/stately/loadouts-queries.ts index 05fd2f5b..15c15a3a 100644 --- a/api/stately/loadouts-queries.ts +++ b/api/stately/loadouts-queries.ts @@ -155,6 +155,13 @@ export function statConstraintsFromStately(statConstraints: StatelyStatConstrain if (c.maxTier !== 10) { constraint.maxTier = c.maxTier; } + if (c.minStat !== 0) { + constraint.minStat = c.minStat; + } + // This is the tricky one - an undefined value means max stat 200 + if (c.maxStat !== 200 && c.maxStat !== 0) { + constraint.maxStat = c.maxStat; + } return constraint; }); @@ -275,6 +282,8 @@ export function statConstraintsToStately(statConstraints: StatConstraint[] | und statHash: c.statHash, minTier: Math.max(0, Math.floor(c.minTier ?? 0)), maxTier: Math.min(Math.ceil(c.maxTier ?? 10), 10), + minStat: Math.max(0, Math.floor(c.minStat ?? 0)), + maxStat: Math.min(Math.ceil(c.maxStat ?? 200), 200), })) : []; }