[priority: highest] Fabricator "Craft" button does nothing when crafting materials #176
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
In the Fabricator tab under Crafting, the "Craft" button for material recipes appears enabled when the player has sufficient materials and mana, but clicking it silently does nothing — no material is crafted and no error message is shown.
Root Cause
In
src/lib/game/crafting-actions/crafting-material-actions.ts, line 19, thecraftMaterialfunction has a guard check:This silently fails when the player is not in "meditate" combat action. The UI's
canCraftRecipecheck only validates material/mana sufficiency, so the button appears enabled regardless of combat action state, misleading the player.Affected Files
src/lib/game/crafting-actions/crafting-material-actions.tsline 19 — guard gatesrc/components/game/tabs/CraftingTab/FabricatorSubTab.tsxlines 163–169 — handler dispatchsrc/components/game/tabs/CraftingTab/MaterialRecipeCard.tsxlines 90–99 — button renderingReproduction
Expected Behavior
Material crafting should work regardless of current combat action (it's instant, not a timed action), or the button should show a clear reason why crafting is unavailable.
Starting investigation of the Fabricator "Craft" button bug. Issue is in crafting-material-actions.ts - the
craftMaterialfunction has a guard that silently fails when combat action is not 'meditate'. Material crafting is instant and shouldn't require meditate state. Will fix the guard and ensure proper UI feedback.Fixed. Removed the
currentAction !== 'meditate'guard fromcraftMaterial()incrafting-material-actions.ts. Material crafting is an instant action (not a timed action like equipment crafting), so it should work regardless of the player's current combat state.Changes:
useCombatStoreimport (no longer needed){ success: false }when not meditatingAll 916 tests pass. Committed and pushed as
aba1265.