fix: claim recipe response (#1106)

Fixes #1105

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.

Reviewed-on: OpenWF/SpaceNinjaServer#1106
Co-authored-by: Sainan <sainan@calamity.inc>
Co-committed-by: Sainan <sainan@calamity.inc>
This commit is contained in:
Sainan 2025-03-08 04:33:45 -08:00 committed by OrdisPrime
parent ec1f504bae
commit 457663f14a

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 = {