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,
|
||||
nullable: false,
|
||||
}),
|
||||
rank: new fields.NumberField({
|
||||
min: 0,
|
||||
initial: 0,
|
||||
max: 3,
|
||||
integer: true,
|
||||
rank: new fields.StringField({
|
||||
initial: gameTerms.Rank.NOVICE,
|
||||
required: true,
|
||||
nullable: false,
|
||||
blank: false,
|
||||
trim: true,
|
||||
choices: Object.values(gameTerms.Rank),
|
||||
}),
|
||||
}),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,4 +11,10 @@ export const gameTerms = Object.preventExtensions({
|
|||
`Rare`,
|
||||
`Scarce`,
|
||||
],
|
||||
Rank: {
|
||||
NOVICE: `Novice`,
|
||||
ADEPT: `Adept`,
|
||||
EXPERT: `Expert`,
|
||||
Master: `Master`,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue