RC-74 | Hero | Rank | Change to StringField w/ Choices

This commit is contained in:
Oliver-Akins 2024-12-30 22:33:26 -07:00
parent e29c5a8cd0
commit 6b88714bfc
2 changed files with 11 additions and 5 deletions

View file

@ -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),
}),
}),
};

View file

@ -11,4 +11,10 @@ export const gameTerms = Object.preventExtensions({
`Rare`,
`Scarce`,
],
Rank: {
NOVICE: `Novice`,
ADEPT: `Adept`,
EXPERT: `Expert`,
Master: `Master`,
},
});