diff --git a/guide/age-of-dwarves/src/vite-plugins/simCachePlugin.ts b/guide/age-of-dwarves/src/vite-plugins/simCachePlugin.ts index 426e0e52..0e0d690b 100644 --- a/guide/age-of-dwarves/src/vite-plugins/simCachePlugin.ts +++ b/guide/age-of-dwarves/src/vite-plugins/simCachePlugin.ts @@ -15,7 +15,7 @@ export function simCachePlugin(): Plugin { const cache = new Map() let engineModule: typeof import('@magic-civ/engine-ts') | null = null let terrainData: Record | null = null - let climateParams: Record | null = null + let climateParams: Record | null = null function loadGameData(root: string): void { const dataDir = path.resolve(root, '../../games/age-of-dwarves/data') @@ -32,13 +32,9 @@ export function simCachePlugin(): Plugin { } } - // Load climate params (extract only numeric values) — from world definition - const paramsPath = path.resolve(root, '../../engine/src/worlds/earth/climate_params.json') - const rawParams = JSON.parse(fs.readFileSync(paramsPath, 'utf8')) as Record - climateParams = {} - for (const [k, v] of Object.entries(rawParams)) { - if (typeof v === 'number') climateParams[k] = v - } + // Load climate params from world definition + const paramsPath = path.resolve(root, '../../resources/worlds/earth/climate_params.json') + climateParams = JSON.parse(fs.readFileSync(paramsPath, 'utf8')) as Record } return {