입양 모달·고양이 카드에 실제 스프라이트 사용

- catSprite(breed, frame) 헬퍼 + CAT_SPRITE_DIR 품종별 폴더 매핑 준비
- 모달 후보는 idle 스프라이트(h-20), 카드 헤더는 미니 아바타(h-7)
- 품종 시트가 들어오면 CAT_SPRITE_DIR 등록만으로 확장

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
이 커밋은 다음에 포함됨:
kjs
2026-08-13 13:49:33 +09:00
co-authored by Claude Fable 5
부모 ef7f702402
커밋 01cca9232c
2개의 변경된 파일과 27개의 추가작업 그리고 3개의 파일을 삭제
+15 -3
파일 보기
@@ -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"
>
<div className="mb-2 text-center">
<div className="text-4xl">{cat.emoji}</div>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={catSprite(cat.breed, "idle")}
alt={cat.name}
className="mx-auto h-20 w-auto object-contain drop-shadow-sm"
/>
<div className="mt-1 font-bold">{cat.name}</div>
<div className="text-xs text-gray-400">
{cat.breedName}{" "}
@@ -430,8 +436,14 @@ function CatCard({
}`}
>
<div className="mb-1 flex items-center justify-between">
<span className="font-semibold">
{cat.emoji} {cat.name}{" "}
<span className="flex items-center gap-1.5 font-semibold">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={catSprite(cat.breed, "idle")}
alt=""
className="h-7 w-7 object-contain"
/>
{cat.name}{" "}
<span className="text-xs font-normal text-gray-400">Lv{cat.level}</span>
</span>
<span className="text-xs text-gray-400">{cat.breedName}</span>
+12
파일 보기
@@ -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<string, string> = {
// 예: 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<AptitudeKey, string> = {
fishing: "/assets/tools/fishing.png",