diff --git a/components/Card.tsx b/components/Card.tsx index d1ba1c0..c72c868 100644 --- a/components/Card.tsx +++ b/components/Card.tsx @@ -54,14 +54,14 @@ export default function Card({ dm, card, position, settings, flipAction }: CardP Card Back
{aria}
diff --git a/constants/tarokkaCards.ts b/constants/tarokkaCards.ts index f8f77db..eb48d5f 100644 --- a/constants/tarokkaCards.ts +++ b/constants/tarokkaCards.ts @@ -9,6 +9,7 @@ const tarokkaCards: TarokkaCard[] = [ aria: 'Back of card', description: 'Back of card', back: true, + extension: '.png', }, { id: 'swashbuckler', diff --git a/public/img/color/back.png b/public/img/color/back.png new file mode 100644 index 0000000..f103960 Binary files /dev/null and b/public/img/color/back.png differ diff --git a/public/img/grayscale/back.png b/public/img/grayscale/back.png new file mode 100644 index 0000000..4fc7123 Binary files /dev/null and b/public/img/grayscale/back.png differ diff --git a/tools/getURL.ts b/tools/getURL.ts index 244c48b..1d0bddc 100644 --- a/tools/getURL.ts +++ b/tools/getURL.ts @@ -4,5 +4,5 @@ import { Settings, TarokkaGameCard } from '@/types'; export default function getURL(card: TarokkaGameCard, settings: Settings) { const styleConfig = cardStyles[settings.cardStyle]; const fileBase = settings.cardStyle === 'standard' ? standardMap[card.id] : card.id; - return `${styleConfig.baseURL}${fileBase}${styleConfig.extension}`; + return `${styleConfig.baseURL}${fileBase}${card.extension || styleConfig.extension}`; } diff --git a/types/index.ts b/types/index.ts index 935eb40..9e8dbbd 100644 --- a/types/index.ts +++ b/types/index.ts @@ -29,6 +29,7 @@ export interface TarokkaBase { aria: string; back: boolean; suit: 'Coins' | 'Glyphs' | 'High Deck' | 'Stars' | 'Swords' | null; + extension?: string; } export interface TarokkaGameBase extends TarokkaBase {