import type { TerrainType } from './types.js'; export const TERRAIN_TYPES: TerrainType[] = [ // Area fills (drawn first, below linear features) { id: 'ocean', name: 'Ocean/Sea', category: 'area', color: '#2a5574', zIndex: 0 }, { id: 'lake', name: 'Lake', category: 'area', color: '#4a90c4', zIndex: 1 }, { id: 'plains', name: 'Plains', category: 'area', color: '#c4b060', zIndex: 2 }, { id: 'farmland', name: 'Farmland', category: 'area', color: '#a4c639', zIndex: 3 }, { id: 'forest', name: 'Forest', category: 'area', color: '#2d6a2d', zIndex: 4 }, { id: 'hills', name: 'Hills', category: 'area', color: '#8a7a5a', zIndex: 5 }, { id: 'mountains', name: 'Mountains', category: 'area', color: '#6a6a6a', zIndex: 6 }, { id: 'settlement', name: 'Settlement', category: 'area', color: '#8b4513', zIndex: 7 }, // Linear features (drawn on top, have edge connectivity) { id: 'river', name: 'River', category: 'linear', color: '#2a7fff', zIndex: 10 }, { id: 'road', name: 'Road', category: 'linear', color: '#a0522d', zIndex: 11 }, { id: 'coastline', name: 'Coastline', category: 'linear', color: '#1a4a6a', zIndex: 12 }, ]; const terrainMap = new Map( TERRAIN_TYPES.map(t => [t.id, t]), ); export function getTerrainType(id: string): TerrainType | undefined { return terrainMap.get(id); } export function getAreaTerrains(): TerrainType[] { return TERRAIN_TYPES.filter(t => t.category === 'area'); } export function getLinearTerrains(): TerrainType[] { return TERRAIN_TYPES.filter(t => t.category === 'linear'); } /** Default terrain for unpainted hexes */ export const DEFAULT_BASE_TERRAIN = 'plains';