Files
BreakEscape/public
Z. Cliffe Schreuders d2901eafa7 Optimize unlock flow to use single API call for doors and containers
Server-side changes:
- Unlock endpoint already returns roomData for doors

Client-side changes:
- Pass serverResponse through minigame callback chain
- Store serverResponse in minigame gameResult (password & PIN)
- Update minigame-starters to pass result to callbacks
- Update unlock-system callbacks to accept and pass serverResponse
- Pass roomData to unlockDoor for doors
- Cache roomData in roomDataCache before loadRoom is called
- loadRoom checks cache before making API call

Benefits:
- Doors: Unlock + room load = 1 API call instead of 2
- Containers: Unlock + contents = 1 API call instead of 2
- More efficient, faster user experience
- Consistent pattern for both doors and containers
2025-11-22 00:46:56 +00:00
..