import type { CropKind, ItemId, BuildingType } from './types' export const TILE_SIZE = 32 export const CHUNK_SIZE = 16 export const WORLD_CHUNKS = 32 export const WORLD_TILES = WORLD_CHUNKS * CHUNK_SIZE export const WORLD_PX = WORLD_TILES * TILE_SIZE export const PLAYER_SPEED = 180 export const INTERACTION_RANGE = 60 export const CAMERA_LERP = 0.09 export const TREE_HEALTH = 3 export const ROCK_HEALTH = 5 export const BUILDING_COSTS: Record> = { floor: { wood: 2 }, wall: { wood: 3, stone: 1 }, chest: { wood: 5, stone: 2 }, bed: { wood: 6 }, stockpile_zone:{ wood: 0 }, } export interface CropConfig { stages: number stageTimeMs: number rewards: Partial> } export const CROP_CONFIGS: Record = { wheat: { stages: 3, stageTimeMs: 20_000, rewards: { wheat: 3, wheat_seed: 2 } }, carrot: { stages: 3, stageTimeMs: 25_000, rewards: { carrot: 4, carrot_seed: 1 } }, } // Villager config export const VILLAGER_SPEED = 75 // px/s — slow and visible export const VILLAGER_SPAWN_INTERVAL = 8_000 // ms between spawn checks export const VILLAGER_WORK_TIMES: Record = { chop: 3000, mine: 5000, farm: 1200, } export const VILLAGER_NAMES = [ 'Aldric','Brix','Cora','Dwyn','Edna','Finn','Greta', 'Holt','Iris','Jorn','Kira','Lars','Mira','Nox', 'Orla','Pike','Quinn','Rook','Sera','Tull','Uma','Vex', ] export const SAVE_KEY = 'tg_save_v5' export const AUTOSAVE_INTERVAL = 30_000 /** Milliseconds for one tree-seedling stage to advance (two stages = full tree). */ export const TREE_SEEDLING_STAGE_MS = 60_000 // 1 min per stage → 2 min total /** Milliseconds before a bare DARK_GRASS tile (after tree felling) reverts to GRASS. */ export const TILE_RECOVERY_MS = 300_000 // 5 minutes