1.8 KiB
1.8 KiB
Task 2: ActionButtons Rework - Context
Task Description
Priority task from task2.md
Requirements:
- Remove Manual Selection: Remove buttons that allow players to manually choose their action.
- Automatic Transition: Automatically switch the state to 'Meditate' whenever a Study or Crafting task finishes.
- 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
currentActionstate comes from the game store- Buttons allow manual selection of actions
What Needs To Be Done:
- Read
src/components/game/ActionButtons.tsxto understand current implementation - Remove the manual selection buttons (or make them read-only)
- Find where Study and Crafting actions complete (look in store.ts or crafting-slice.ts)
- Add logic to automatically set
currentActionto 'meditate' when Study or Crafting completes - Replace buttons with a read-only "Current Activity" indicator showing the current action
- Test the changes
- 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 modifysrc/lib/game/store.ts- likely contains action completion logicsrc/lib/game/crafting-slice.ts- crafting completion logic
Implementation Notes:
- Study completes when
studyProgressfinishes - Crafting completes when
preparationProgressorenchantProgressfinishes - Need to track these completion events and trigger the Meditate transition