From 803252508f679ca140a784dbed366e0a8d013c6e Mon Sep 17 00:00:00 2001 From: Sainan Date: Sun, 5 Jan 2025 05:55:04 +0100 Subject: [PATCH] update InvigorationsApplied --- src/controllers/api/infestedFoundryController.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/api/infestedFoundryController.ts b/src/controllers/api/infestedFoundryController.ts index db1d26f8..c560a9f4 100644 --- a/src/controllers/api/infestedFoundryController.ts +++ b/src/controllers/api/infestedFoundryController.ts @@ -198,6 +198,8 @@ export const infestedFoundryController: RequestHandler = async (req, res) => { inventory.InfestedFoundry!.Resources!.find(x => x.ItemType == request.ResourceTypes[i])!.Count -= request.ResourceCosts[i]; } + inventory.InfestedFoundry!.InvigorationsApplied ??= 0; + inventory.InfestedFoundry!.InvigorationsApplied += 1; await inventory.save(); res.json({ SuitId: request.SuitId,