feat(inventory): add squareEmoji to RARITY_CONFIG

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
syntaxbullet
2026-03-28 17:04:07 +01:00
parent ba8afd144e
commit fa09ef25e2

View File

@@ -3,17 +3,17 @@
* Provides the canonical rarity display config (colors, emoji, labels) * Provides the canonical rarity display config (colors, emoji, labels)
* used by lootbox pull results and shop loot table views. * used by lootbox pull results and shop loot table views.
*/ */
export const RARITY_CONFIG: Record<string, { color: number; emoji: string; label: string }> = { export const RARITY_CONFIG: Record<string, { color: number; emoji: string; squareEmoji: string; label: string }> = {
C: { color: 0x95A5A6, emoji: "📦", label: "Common" }, C: { color: 0x95A5A6, emoji: "📦", squareEmoji: "🟤", label: "Common" },
R: { color: 0x3498DB, emoji: "📦", label: "Rare" }, R: { color: 0x3498DB, emoji: "📦", squareEmoji: "🔵", label: "Rare" },
SR: { color: 0x9B59B6, emoji: "✨", label: "Super Rare" }, SR: { color: 0x9B59B6, emoji: "✨", squareEmoji: "🟣", label: "Super Rare" },
SSR: { color: 0xF1C40F, emoji: "🌟", label: "SSR" }, SSR: { color: 0xF1C40F, emoji: "🌟", squareEmoji: "🟡", label: "SSR" },
CURRENCY: { color: 0x2ECC71, emoji: "💰", label: "Currency" }, CURRENCY: { color: 0x2ECC71, emoji: "💰", squareEmoji: "💰", label: "Currency" },
XP: { color: 0x1ABC9C, emoji: "🔮", label: "Experience" }, XP: { color: 0x1ABC9C, emoji: "🔮", squareEmoji: "🔮", label: "Experience" },
NOTHING: { color: 0x636363, emoji: "💨", label: "Empty" }, NOTHING: { color: 0x636363, emoji: "💨", squareEmoji: "💨", label: "Empty" },
}; };
export function getRarityConfig(rarity: string): { color: number; emoji: string; label: string } { export function getRarityConfig(rarity: string): { color: number; emoji: string; squareEmoji: string; label: string } {
return RARITY_CONFIG[rarity] ?? (RARITY_CONFIG["C"]!); return RARITY_CONFIG[rarity] ?? (RARITY_CONFIG["C"]!);
} }