From 534e7f7face1757ab4d55ca20bbc1d0e1f4813f0 Mon Sep 17 00:00:00 2001 From: Sainan Date: Thu, 2 May 2024 19:00:25 +0200 Subject: [PATCH] Also apply infiniteResources on inventoryController response This makes these values consistent with the values in getCreditsController, so they appear "correctly" right upon login. --- src/controllers/api/inventoryController.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index bb0f1473..090e7d51 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -34,6 +34,13 @@ const inventoryController: RequestHandler = async (request: Request, response: R const inventoryResponse = toInventoryResponse(inventoryJSON); + if (config.infiniteResources) { + inventoryResponse.RegularCredits = 999999999; + inventoryResponse.TradesRemaining = 999999999; + inventoryResponse.PremiumCreditsFree = 999999999; + inventoryResponse.PremiumCredits = 999999999; + } + if (config.unlockAllMissions) inventoryResponse.Missions = allMissions; if (config.unlockAllQuests) inventoryResponse.QuestKeys = allQuestKeys;