add image/label helpers for proficiency and rarity
This commit is contained in:
parent
2140d58fe8
commit
b2108dfaa9
2 changed files with 12 additions and 0 deletions
|
|
@ -32,3 +32,9 @@ export function getProficiencyOptions() {
|
||||||
label
|
label
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getProficiencyImage(proficiency: number): string {
|
||||||
|
const label = PROFICIENCY_LABELS[proficiency]
|
||||||
|
if (!label || label === 'None') return ''
|
||||||
|
return `/images/proficiencies/${label.toLowerCase()}.png`
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,3 +27,9 @@ export function getRarityClass(rarity: number): string {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getRarityImage(rarity: number): string {
|
||||||
|
const label = RARITY_LABELS[rarity]
|
||||||
|
if (!label) return ''
|
||||||
|
return `/images/rarity/${label.toLowerCase()}.png`
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue