From 55e28715317ec4d3b92c5c5adcb0687c30b7a713 Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Fri, 14 Nov 2025 01:49:48 -0800 Subject: [PATCH] fix: give ChallengeProgress with unlockAllScans cheat (#3020) Closes #3013 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3020 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> --- .../custom/unlockAllScansController.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/controllers/custom/unlockAllScansController.ts b/src/controllers/custom/unlockAllScansController.ts index fb79251e..684c75ab 100644 --- a/src/controllers/custom/unlockAllScansController.ts +++ b/src/controllers/custom/unlockAllScansController.ts @@ -3,10 +3,11 @@ import allScans from "../../../static/fixed_responses/allScans.json" with { type import { ExportEnemies } from "warframe-public-export-plus"; import { getAccountIdForRequest } from "../../services/loginService.ts"; import { getStats } from "../../services/statsService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; export const unlockAllScansController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); - const stats = await getStats(accountId); + const [stats, inventory] = await Promise.all([getStats(accountId), getInventory(accountId, "ChallengeProgress")]); const scanTypes = new Set(allScans); for (const type of Object.keys(ExportEnemies.avatars)) { @@ -18,6 +19,17 @@ export const unlockAllScansController: RequestHandler = async (req, res) => { stats.Scans.push({ type, scans: 9999 }); } - await stats.save(); + const jsCodex = inventory.ChallengeProgress.find(x => x.Name === "JSCodexScan"); + + if (jsCodex) { + jsCodex.Progress = 1; + } else { + inventory.ChallengeProgress.push({ + Name: "JSCodexScan", + Progress: 1 + }); + } + + await Promise.all([stats.save(), inventory.save()]); res.end(); };