Bug: Fabricator recipes use Raw Mana instead of required elemental mana #155
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?
Bug Description
Fabricator recipes that require specific elemental mana (Earth, Crystal, etc.) are incorrectly using/displaying the player's Raw Mana pool instead of the appropriate elemental mana.
Root Causes
1. UI Display Issue
src/components/game/tabs/CraftingTab/FabricatorSubTab.tsxline 127 readsrawManafrom the mana store and passes it asmanaAmounttoRecipeCard(line 175). ThecanCraftRecipefunction infabricator-recipes.ts(lines 208-222) compares this singlemanaCostnumber againstmanaAmount, completely ignoring the recipe'smanaTypefield.2. Crafting Execution Issue
The
startCraftingEquipmentincraftingStore.ts(lines 268-290) passesrawManatoCraftingEquipment.canStartEquipmentCrafting, which looks upCRAFTING_RECIPES[fabricator-${recipe.id}]. No fabricator IDs exist inCRAFTING_RECIPES, so crafting can never actually start.Fix Required
FabricatorSubTab.tsx: Read the appropriate elemental mana from the mana store based on each recipe'smanaTypefieldfabricator-recipes.ts: UpdatecanCraftRecipeto accept a mana type parameter and check the correct mana poolcraftingStore.ts: Either add fabricator recipes to the crafting system or create a separate fabricator crafting execution path that correctly deducts the right mana typeAffected Files
src/components/game/tabs/CraftingTab/FabricatorSubTab.tsx(lines 127, 133, 175)src/lib/game/data/fabricator-recipes.ts(lines 208-222,canCraftRecipe)src/lib/game/stores/craftingStore.ts(lines 268-290)src/lib/game/crafting-equipment.ts(line 20)Starting work on #155 — Fabricator recipes use Raw Mana instead of elemental. Will fix mana type display in FabricatorSubTab, canCraftRecipe logic, and crafting execution path.
Fixed #155 — Fabricator recipes now use correct elemental mana type.
Changes:
All 885 tests pass. Committed and pushed as
64b4725.