From 878c6fe2b233f7955fbf31567c2b0dc48cb5c3d5 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 8 Mar 2026 23:33:58 +0000 Subject: [PATCH] fix(industry): check toolRequired in findCraftable Co-Authored-By: Claude Opus 4.6 --- server/src/industry/recipeRegistry.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/industry/recipeRegistry.ts b/server/src/industry/recipeRegistry.ts index 293de36..be00d2a 100644 --- a/server/src/industry/recipeRegistry.ts +++ b/server/src/industry/recipeRegistry.ts @@ -31,6 +31,7 @@ export class RecipeRegistry { findCraftable(inv: Inventory, workshopType?: string): Recipe[] { return this.getAll().filter(recipe => { if (recipe.workshopType && recipe.workshopType !== workshopType) return false; + if (recipe.toolRequired && !inv.has(recipe.toolRequired)) return false; return recipe.inputs.every(input => (inv.get(input.itemId) ?? 0) >= input.quantity); }); }