21 lines
877 B
TypeScript
21 lines
877 B
TypeScript
import type { BuildingType } from '~/types/game'
|
|
|
|
/** Tile colours per building type: a soft fill and a darker line for border and glyph. */
|
|
export const BUILDING_COLORS: Record<BuildingType, { fill: string; line: string }> = {
|
|
headquarters: { fill: '#f6e3bf', line: '#a8661b' },
|
|
storage: { fill: '#ece0cb', line: '#80603f' },
|
|
farm: { fill: '#eef2cf', line: '#76892a' },
|
|
timber_camp: { fill: '#dfecd5', line: '#3f7a37' },
|
|
clay_pit: { fill: '#f6dccd', line: '#b0502a' },
|
|
iron_mine: { fill: '#e3e7ed', line: '#55606f' },
|
|
hiding_place: { fill: '#ebe3f2', line: '#6e5390' },
|
|
wall: { fill: '#e7e3dc', line: '#6a6257' },
|
|
rally_point: { fill: '#f6dfdf', line: '#a63a3a' },
|
|
}
|
|
|
|
export const buildingTileStyle = (type: BuildingType) => ({
|
|
backgroundColor: BUILDING_COLORS[type].fill,
|
|
borderColor: BUILDING_COLORS[type].line,
|
|
color: BUILDING_COLORS[type].line,
|
|
})
|