RC-74 | Hero | Rank | Change to StringField w/ Choices
This commit is contained in:
parent
e29c5a8cd0
commit
6b88714bfc
2 changed files with 11 additions and 5 deletions
|
|
@ -109,13 +109,13 @@ export class HeroData extends foundry.abstract.TypeDataModel {
|
||||||
required: true,
|
required: true,
|
||||||
nullable: false,
|
nullable: false,
|
||||||
}),
|
}),
|
||||||
rank: new fields.NumberField({
|
rank: new fields.StringField({
|
||||||
min: 0,
|
initial: gameTerms.Rank.NOVICE,
|
||||||
initial: 0,
|
|
||||||
max: 3,
|
|
||||||
integer: true,
|
|
||||||
required: true,
|
required: true,
|
||||||
nullable: false,
|
nullable: false,
|
||||||
|
blank: false,
|
||||||
|
trim: true,
|
||||||
|
choices: Object.values(gameTerms.Rank),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,4 +11,10 @@ export const gameTerms = Object.preventExtensions({
|
||||||
`Rare`,
|
`Rare`,
|
||||||
`Scarce`,
|
`Scarce`,
|
||||||
],
|
],
|
||||||
|
Rank: {
|
||||||
|
NOVICE: `Novice`,
|
||||||
|
ADEPT: `Adept`,
|
||||||
|
EXPERT: `Expert`,
|
||||||
|
Master: `Master`,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue