Files
nissefolk/src/config.ts
tekki mariani 969a82949e Försterkreislauf: Setzlinge beim Fällen, Försterhaus, Förster-Job
- Gefällter Baum → 1–2 tree_seed im Stockpile (zufällig)
- Neues Gebäude forester_hut (50 wood): Log-Hütten-Grafik, Klick öffnet Info-Panel
- Zonenmarkierung: Edit-Zone-Tool, Radius 5 Tiles, halbtransparente Overlay-Anzeige
- Neuer JobType 'forester': Nisse pflanzen Setzlinge auf markierten Zonen-Tiles
- Chop-Priorisierung: Zonen-Bäume werden vor natürlichen Bäumen gefällt
- Nisse-Panel & Info-Panel zeigen forester-Priorität-Button

Closes #25

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 13:07:36 +00:00

65 lines
2.1 KiB
TypeScript

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<BuildingType, Record<string, number>> = {
floor: { wood: 2 },
wall: { wood: 3, stone: 1 },
chest: { wood: 5, stone: 2 },
bed: { wood: 6 },
stockpile_zone:{ wood: 0 },
forester_hut: { wood: 50 },
}
/** Max Chebyshev radius (in tiles) that a forester hut's zone can extend. */
export const FORESTER_ZONE_RADIUS = 5
export interface CropConfig {
stages: number
stageTimeMs: number
rewards: Partial<Record<ItemId, number>>
}
export const CROP_CONFIGS: Record<CropKind, CropConfig> = {
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<string, number> = {
chop: 3000,
mine: 5000,
farm: 1200,
forester: 2000,
}
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
/** localStorage key for UI settings (opacity etc.) — separate from the game save. */
export const UI_SETTINGS_KEY = 'tg_ui_settings'
/** 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