add image/label helpers for proficiency and rarity

This commit is contained in:
Justin Edmund 2026-01-04 19:52:35 -08:00
parent 2140d58fe8
commit b2108dfaa9
2 changed files with 12 additions and 0 deletions

View file

@ -32,3 +32,9 @@ export function getProficiencyOptions() {
label
}))
}
export function getProficiencyImage(proficiency: number): string {
const label = PROFICIENCY_LABELS[proficiency]
if (!label || label === 'None') return ''
return `/images/proficiencies/${label.toLowerCase()}.png`
}

View file

@ -27,3 +27,9 @@ export function getRarityClass(rarity: number): string {
return ''
}
}
export function getRarityImage(rarity: number): string {
const label = RARITY_LABELS[rarity]
if (!label) return ''
return `/images/rarity/${label.toLowerCase()}.png`
}