From 00e07044139c66e71dae807dda8a378a54efc814 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Wed, 1 Apr 2026 06:23:50 -0700 Subject: [PATCH] =?UTF-8?q?feat(guide):=20=E2=9C=A8=20Enhance=20guide=20na?= =?UTF-8?q?vigation=20with=20dynamic=20sections,=20tooltips,=20and=20impro?= =?UTF-8?q?ved=20content=20loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- games/age-of-dwarves/guide/src/App.tsx | 82 ++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 11 deletions(-) diff --git a/games/age-of-dwarves/guide/src/App.tsx b/games/age-of-dwarves/guide/src/App.tsx index c6962eb6..a3563ccb 100644 --- a/games/age-of-dwarves/guide/src/App.tsx +++ b/games/age-of-dwarves/guide/src/App.tsx @@ -2,12 +2,27 @@ import { lazy, Suspense, useState, useCallback, useMemo, type ReactElement } fro import { Routes, Route, Navigate, useSearchParams } from 'react-router-dom' import styled from 'styled-components' import { ThemeProvider } from '@lilith/ui-theme' +import { GuideDataProvider, type GuideDataContextValue } from '@magic-civ/guide-engine' import { GuideLayout } from '@/components/layout/GuideLayout' import { WelcomeModal } from '@/components/welcome/WelcomeModal' import { EncyclopediaModal } from '@/components/EncyclopediaModal' import { usePlayerPreferences, type PlayerPreferences, type ColorMode, type FontSize, FONT_SIZE_PX } from '@/hooks/usePlayerPreferences' import { PreferencesProvider, usePreferences, usePreferencesReroll, type ConcreteRace, type ConcreteGender } from '@/contexts/PreferencesContext' import { getThemeForPreferences } from '@/theme/fantasy-theme' +import { + techTierMap, allTerrains, allKeywords, climateSpec, climateParams, hydrologyParams, + allEventCategories, crossTriggers, weatherEvents, leyChanneling, + qualityUpThreshold, qualityDownThreshold, mountainRainShadowBlock, + windBands, terrainModifiers, +} from '@/data/engine' +import { + allUnits, allSpells, allBuildings, allWonders, allRaces, + allResources, allImprovements, allGovernments, allEras, allVictories, + promotionsData, infusionConfig, infusionTrees, disciplinesData, + allTechs, allItems, allMapTypes, + allEncyclopediaEntries, encyclopediaCategories, + playerBuildings, npcBuildings, +} from '@/data/game' // The Map const TerrainPage = lazy(() => import('@/pages/TerrainPage')) @@ -73,6 +88,47 @@ const DevSpritesPage = lazy(() => import('@/pages/DevSpritesPage')) const DEFAULT_PREFS: PlayerPreferences = { race: 'random', gender: 'random', name: '', colorMode: 'dark', dyslexicFont: false, fontSize: 'md' } +const guideData: GuideDataContextValue = { + packId: 'age-of-dwarves', + packName: 'Age of Dwarves', + races: allRaces, + units: allUnits, + buildings: allBuildings, + spells: allSpells, + techs: allTechs, + keywords: allKeywords, + terrains: allTerrains, + resources: allResources, + improvements: allImprovements, + governments: allGovernments, + eras: allEras, + victories: allVictories, + mapTypes: allMapTypes, + items: allItems, + encyclopediaEntries: allEncyclopediaEntries, + encyclopediaCategories, + promotionsData, + disciplinesData, + infusionConfig, + infusionTrees, + playerWonders: allWonders, + playerBuildings, + npcBuildings, + climateSpec, + climateParams, + hydrologyParams, + weatherEvents, + windBands, + qualityUpThreshold, + qualityDownThreshold, + mountainRainShadowBlock, + allEventCategories, + crossTriggers, + leyChanneling, + terrainModifiers, + techTierMap, +} + export default function App(): ReactElement { const { preferences, isFirstVisit, save } = usePlayerPreferences() const [searchParams] = useSearchParams() @@ -165,21 +221,25 @@ export default function App(): ReactElement { if (noGui) { return ( - - - {routes} - - - + + + + {routes} + + + + ) } return ( - - - {routes} - - + + + + {routes} + + + ) }