diff --git a/src/components/game/Game.tsx b/src/components/game/Game.tsx index f74bdf9..856d9f2 100644 --- a/src/components/game/Game.tsx +++ b/src/components/game/Game.tsx @@ -7,6 +7,7 @@ import { engine, effectiveRate, activeRecipe, fullnessPenalty } from "@/lib/game import { APTITUDE_LABEL, BREEDS, + catSprite, HALL_LEVELS, KITCHEN_BUILD_COST, KITCHEN_MEAL_CAP, @@ -176,7 +177,12 @@ function AdoptModal({ className="flex flex-col rounded-xl border border-gray-200 p-4 dark:border-gray-700" >
-
{cat.emoji}
+ {/* eslint-disable-next-line @next/next/no-img-element */} + {cat.name}
{cat.name}
{cat.breedName}{" "} @@ -430,8 +436,14 @@ function CatCard({ }`} >
- - {cat.emoji} {cat.name}{" "} + + {/* eslint-disable-next-line @next/next/no-img-element */} + + {cat.name}{" "} Lv{cat.level} {cat.breedName} diff --git a/src/lib/game/data.ts b/src/lib/game/data.ts index 287d4d6..13272ce 100644 --- a/src/lib/game/data.ts +++ b/src/lib/game/data.ts @@ -4,6 +4,18 @@ import type { AptitudeKey } from "./types"; export const APTITUDE_RATE = [0, 1.0, 2.2, 4.8, 10.0, 21.0, 45.0]; export const BASE_RATE = 0.2; +// 품종별 스프라이트 폴더 (public/assets/cats/{폴더}/). 미등록 품종은 기본(오렌지 태비) 사용 +export const CAT_SPRITE_DIR: Record = { + // 예: korean_shorthair: "korean_shorthair", ← 품종 시트가 준비되면 등록 +}; + +export type CatFrame = "idle" | "walk1" | "walk2" | "work"; + +export function catSprite(breed: string, frame: CatFrame): string { + const dir = CAT_SPRITE_DIR[breed]; + return dir ? `/assets/cats/${dir}/${frame}.png` : `/assets/cats/${frame}.png`; +} + // 적성별 도구 일러스트 (public/assets/tools/) export const TOOL_IMG: Record = { fishing: "/assets/tools/fishing.png",