mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
.
This commit is contained in:
parent
d113ddce74
commit
75510f2797
2 changed files with 8 additions and 5 deletions
|
|
@ -2570,6 +2570,7 @@
|
|||
"evasionMin": "Evasion (Min)",
|
||||
"evasionMax": "Evasion (Max)",
|
||||
"subtype": "Subtype",
|
||||
"missing": "<Missing>",
|
||||
"folders": {
|
||||
"characters": "Characters",
|
||||
"adversaries": "Adversaries",
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ export const typeConfig = {
|
|||
{
|
||||
key: 'system.linkedClass',
|
||||
label: 'Class',
|
||||
format: linkedClass => linkedClass.name
|
||||
format: linkedClass => linkedClass?.name ?? game.i18n.localize('DAGGERHEART.UI.ItemBrowser.missing')
|
||||
},
|
||||
{
|
||||
key: 'system.spellcastingTrait',
|
||||
|
|
@ -375,10 +375,12 @@ export const typeConfig = {
|
|||
key: 'system.linkedClass.uuid',
|
||||
label: 'Class',
|
||||
choices: items => {
|
||||
const list = items.map(item => ({
|
||||
value: item.system.linkedClass.uuid,
|
||||
label: item.system.linkedClass.name
|
||||
}));
|
||||
const list = items
|
||||
.filter(item => item.system.linkedClass)
|
||||
.map(item => ({
|
||||
value: item.system.linkedClass.uuid,
|
||||
label: item.system.linkedClass.name
|
||||
}));
|
||||
return list.reduce((a, c) => {
|
||||
if (!a.find(i => i.value === c.value)) a.push(c);
|
||||
return a;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue