35 lines
1.8 KiB
Markdown
35 lines
1.8 KiB
Markdown
# Task 2: ActionButtons Rework - Context
|
|
|
|
## Task Description
|
|
**Priority task from task2.md**
|
|
|
|
### Requirements:
|
|
1. **Remove Manual Selection:** Remove buttons that allow players to manually choose their action.
|
|
2. **Automatic Transition:** Automatically switch the state to 'Meditate' whenever a Study or Crafting task finishes.
|
|
3. **Status Display:** Replace buttons with a read-only 'Current Activity' indicator.
|
|
|
|
### Current Implementation:
|
|
- ActionButtons component is in `/home/user/repos/Mana-Loop/src/components/game/ActionButtons.tsx`
|
|
- The component currently shows buttons for: meditate, climb, study, craft, repair, convert, design, prepare, enchant
|
|
- `currentAction` state comes from the game store
|
|
- Buttons allow manual selection of actions
|
|
|
|
### What Needs To Be Done:
|
|
1. Read `src/components/game/ActionButtons.tsx` to understand current implementation
|
|
2. Remove the manual selection buttons (or make them read-only)
|
|
3. Find where Study and Crafting actions complete (look in store.ts or crafting-slice.ts)
|
|
4. Add logic to automatically set `currentAction` to 'meditate' when Study or Crafting completes
|
|
5. Replace buttons with a read-only "Current Activity" indicator showing the current action
|
|
6. Test the changes
|
|
7. Commit with message: "Task 2: ActionButtons rework - remove manual selection, auto-transition to Meditate"
|
|
|
|
### Key Files To Examine:
|
|
- `src/components/game/ActionButtons.tsx` - main component to modify
|
|
- `src/lib/game/store.ts` - likely contains action completion logic
|
|
- `src/lib/game/crafting-slice.ts` - crafting completion logic
|
|
|
|
### Implementation Notes:
|
|
- Study completes when `studyProgress` finishes
|
|
- Crafting completes when `preparationProgress` or `enchantProgress` finishes
|
|
- Need to track these completion events and trigger the Meditate transition
|