From dcc32c288fe63317e57a4783afa5e93f73dc4f19 Mon Sep 17 00:00:00 2001 From: Thomas Hallock Date: Sun, 30 Nov 2025 20:35:38 -0600 Subject: [PATCH] feat(know-your-world): auto-enable hot/cold for learning mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a game starts with the "learning" assistance level, automatically enable hot/cold audio feedback for all players. This ensures the full learning experience is available without requiring manual toggle. The setting is also persisted to localStorage so it remains enabled if the player navigates away and returns. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../know-your-world/components/MapRenderer.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/web/src/arcade-games/know-your-world/components/MapRenderer.tsx b/apps/web/src/arcade-games/know-your-world/components/MapRenderer.tsx index 082379c9..247cb09d 100644 --- a/apps/web/src/arcade-games/know-your-world/components/MapRenderer.tsx +++ b/apps/web/src/arcade-games/know-your-world/components/MapRenderer.tsx @@ -637,6 +637,16 @@ export function MapRenderer({ return localStorage.getItem('knowYourWorld.hotColdAudio') === 'true' }) + // Auto-enable hot/cold for learning mode (highest assistance level) + // This ensures all players in a learning game get hot/cold feedback enabled + useEffect(() => { + if (assistanceLevel === 'learning' && assistanceAllowsHotCold && !hotColdEnabled) { + setHotColdEnabled(true) + // Also persist to localStorage so it stays enabled if they navigate away + localStorage.setItem('knowYourWorld.hotColdAudio', 'true') + } + }, [assistanceLevel, assistanceAllowsHotCold, hotColdEnabled]) + // Whether hot/cold button should be shown at all // Uses hasAnyFinePointer because iPads with attached mice should show hot/cold const showHotCold = isSpeechSupported && hasAnyFinePointer && assistanceAllowsHotCold