1.5 KiB
1.5 KiB
Task 2: Research Locking in SkillsTab - Context
Task Description
From task2.md: Prevent switching research topics while a study action is in progress in the SkillsTab.
Current Implementation:
- SkillsTab component is in
/home/user/repos/Mana-Loop/src/components/game/SkillsTab.tsx - Another version exists at
/home/user/repos/Mana-Loop/src/components/game/tabs/SkillsTab.tsx - Research topics/skills can be selected for studying
- The
currentActionstate in the game store tracks if "study" is in progress
What Needs To Be Done:
- Read
src/components/game/SkillsTab.tsxto understand current implementation - Find where research topics/skills are selected
- Check if
store.currentAction === 'study'(study is in progress) - Disable topic switching/selection while study is in progress
- Show a message like "Cannot switch topics while studying" or disable the UI elements
- Test the changes
- Commit with message: "Task 2: Research Locking - prevent switching topics while study in progress"
Key Files:
src/components/game/SkillsTab.tsx- main component to modifysrc/lib/game/store.ts- containscurrentActionstate
Implementation Notes:
- The study action is started when a skill is selected for study
- While
currentAction === 'study', the player should not be able to switch to a different research topic - Consider graying out or disabling the skill selection buttons
- Show a tooltip or message explaining why switching is disabled