From 0733fdf4072cd6e62a764d10540d8ed121ecb43f Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Tue, 11 Nov 2025 03:51:20 +0100 Subject: [PATCH] fix: give ChallengeProgress with unlockAllScans cheat Closes #3013 --- src/controllers/custom/unlockAllScansController.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/controllers/custom/unlockAllScansController.ts b/src/controllers/custom/unlockAllScansController.ts index fb79251e..ca7990cb 100644 --- a/src/controllers/custom/unlockAllScansController.ts +++ b/src/controllers/custom/unlockAllScansController.ts @@ -3,10 +3,12 @@ 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 inventory = await getInventory(accountId, "ChallengeProgress"); const scanTypes = new Set(allScans); for (const type of Object.keys(ExportEnemies.avatars)) { @@ -18,6 +20,18 @@ export const unlockAllScansController: RequestHandler = async (req, res) => { stats.Scans.push({ type, scans: 9999 }); } + const jsCodex = inventory.ChallengeProgress.find(x => x.Name === "JSCodexScan"); + + if (jsCodex) { + jsCodex.Progress = 1; + } else { + inventory.ChallengeProgress.push({ + Name: "JSCodexScan", + Progress: 1 + }); + } + await stats.save(); + await inventory.save(); res.end(); };