Improvements to the UI

This commit is contained in:
pricewowen
2026-05-24 08:49:37 -06:00
parent d35b4e57d9
commit ec1bfa3fbe
60 changed files with 669 additions and 391 deletions

26
lib/pet-status.ts Normal file
View File

@@ -0,0 +1,26 @@
import type { AvatarMood } from "@/lib/avatar-state";
export const PET_EMOTION_DISPLAY_MS = 3200;
export type PetStatusImageId = "status-1" | "status-2" | "status-3";
export const PET_STATUS_BY_MOOD: Record<AvatarMood, PetStatusImageId> = {
happy: "status-1",
neutral: "status-2",
tired: "status-3",
};
export function getPetStatusImagePath(mood: AvatarMood): string {
return `/status/${PET_STATUS_BY_MOOD[mood]}.png`;
}
export function getPetEmotionMessage(mood: AvatarMood): string {
switch (mood) {
case "happy":
return "Your bit seems cheerful and in good spirits.";
case "tired":
return "Your bit seems worn out and could use some care.";
default:
return "Your bit seems steady and doing okay.";
}
}