Fix Task 9: Climb/Descend Controls

1. Fixed exitSpireMode in store.ts to allow exit at any floor for re-entry resume
2. Removed floor restriction on Exit Spire button in page.tsx
3. Updated descend button label to use currentAction for 'Climbing' status
This commit is contained in:
Refactoring Agent
2026-04-29 10:39:11 +02:00
parent 351b6c2dca
commit c8a01acda3
2 changed files with 10 additions and 19 deletions
+8 -14
View File
@@ -273,22 +273,16 @@ export default function ManaLoopGame() {
>
<ChevronDown className="w-4 h-4 mr-2" />
{store.isDescending ? 'Descending…' :
store.climbDirection === 'up' ? 'Climbing' :
store.currentAction === 'climb' ? 'Climbing' :
'Begin Descent'}
</Button>
{store.currentFloor === 1 ? (
<Button
variant="default"
className="bg-green-600 hover:bg-green-700"
onClick={() => store.exitSpireMode()}
>
Exit Spire
</Button>
) : (
<span className="text-xs text-gray-400 flex items-center">
Reach floor 1 to exit
</span>
)}
<Button
variant="default"
className="bg-green-600 hover:bg-green-700"
onClick={() => store.exitSpireMode()}
>
Exit Spire
</Button>
</div>
</div>