Skip to content

Commit

Permalink
Correctly count ingredient costs for recipes that produce >1 items
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed Jan 11, 2025
1 parent e0e7161 commit bfbb46f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion updater/update_items.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ class ItemUpdater {
count: 0
};
const ingredientData = ingredients[ingredientName];
ingredientData.count += ingredient.ItemCount * count;
ingredientData.count +=
ingredient.ItemCount * Math.ceil(count / recipe.num);

if (
ingredientRawName.includes("WeaponParts") ||
Expand Down

0 comments on commit bfbb46f

Please sign in to comment.