2.0 KiB
2.0 KiB
Task 10: Crafting - Prepare/Design Limits - Context
Task Description
From task2.md: Disable "Prepare" for non-enchanted items; limit "Design" to gear types currently owned.
Current Implementation:
- Crafting system involves:
src/components/game/tabs/CraftingTab.tsx- main crafting UIsrc/components/game/crafting/EnchantmentPreparer.tsx- Prepare stagesrc/lib/game/crafting-slice.ts- crafting logic
currentActioncan be 'design', 'prepare', 'enchant'- "Prepare" stage is for preparing equipment for enchanting
What Needs To Be Done:
Part 1: Disable "Prepare" for non-enchanted items
- Read
EnchantmentPreparer.tsxto understand current logic - Currently shows "Prepare" option for non-enchanted items
- Clarify: Does this mean:
- Disable the "Prepare" button if the item is NOT enchanted?
- Or disable if there are no enchanted items to disenchant?
- Make the appropriate changes to disable "Prepare" based on the requirement
Part 2: Limit "Design" to gear types currently owned
- Read
CraftingTab.tsxto understand the "Design" stage - Find where gear types are listed for design
- Filter to only show gear types that the player currently owns (has blueprints for)
- This might involve checking
store.lootInventory.blueprintsor similar
Final Steps:
- Test the changes
- Commit with message: "Task 2: Crafting - disable Prepare for non-enchanted items, limit Design to owned gear types"
Key Files:
src/components/game/tabs/CraftingTab.tsx- Design and Prepare stagessrc/components/game/crafting/EnchantmentPreparer.tsx- Prepare logicsrc/lib/game/crafting-slice.ts- crafting state managementsrc/lib/game/data/equipment.ts- equipment types definition
Implementation Notes:
- "Prepare" is the action of preparing equipment for enchanting
- Non-enchanted items might refer to items that don't have enchantments yet
- "Design" stage lets players design enchantments for gear types
- Limit to "owned" gear types = types that the player has blueprints for (in
lootInventory.blueprints)