fix: claim recipe response
All checks were successful
Build / build (18) (push) Successful in 59s
Build / build (18) (pull_request) Successful in 41s
Build / build (20) (pull_request) Successful in 58s
Build / build (22) (pull_request) Successful in 53s
Build / build (22) (push) Successful in 38s
Build / build (20) (push) Successful in 59s

The client already 'knows' the ItemCount was decremented so when we also say it in the response, it actually ends up causing the client to think the recipe was used twice.
This commit is contained in:
Sainan 2025-03-08 06:28:54 +01:00
parent 137213520e
commit 4c45c35f54

View File

@ -95,16 +95,12 @@ export const claimCompletedRecipeController: RequestHandler = async (req, res) =
let InventoryChanges = {};
if (recipe.consumeOnUse) {
const recipeChanges = [
addRecipes(inventory, [
{
ItemType: pendingRecipe.ItemType,
ItemCount: -1
}
];
InventoryChanges = { ...InventoryChanges, Recipes: recipeChanges };
addRecipes(inventory, recipeChanges);
]);
}
if (req.query.rush) {
InventoryChanges = {