RC-123 | Skill | Advances
This commit is contained in:
parent
8cfb6e5238
commit
fd3803698a
3 changed files with 29 additions and 7 deletions
|
|
@ -1,7 +1,23 @@
|
|||
import { gameTerms } from "../../gameTerms.mjs";
|
||||
|
||||
const { fields } = foundry.data;
|
||||
|
||||
export class SkillData extends foundry.abstract.TypeDataModel {
|
||||
// MARK: Schema
|
||||
static defineSchema() {
|
||||
return {};
|
||||
const schema = {};
|
||||
|
||||
const advances = {};
|
||||
for (const rank of Object.values(gameTerms.Rank)) {
|
||||
advances[rank] = new fields.StringField({
|
||||
blank: false,
|
||||
nullable: true,
|
||||
initial: null,
|
||||
});
|
||||
};
|
||||
schema.advances = new fields.SchemaField(advances);
|
||||
|
||||
return schema;
|
||||
};
|
||||
|
||||
// MARK: Base Data
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ export const gameTerms = Object.preventExtensions({
|
|||
`Rare`,
|
||||
`Scarce`,
|
||||
],
|
||||
Rank: {
|
||||
NOVICE: `Novice`,
|
||||
ADEPT: `Adept`,
|
||||
EXPERT: `Expert`,
|
||||
MASTER: `Master`,
|
||||
},
|
||||
Rank: Object.freeze({
|
||||
NOVICE: `novice`,
|
||||
ADEPT: `adept`,
|
||||
EXPERT: `expert`,
|
||||
MASTER: `master`,
|
||||
}),
|
||||
Anatomy: Object.freeze({
|
||||
HEAD: `head`,
|
||||
BODY: `body`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue