Nouvelles corrections sur la fiche
This commit is contained in:
@@ -2,6 +2,7 @@ export { default as AwECharacter } from "./character.mjs"
|
||||
export { default as AwECreature } from "./creature.mjs"
|
||||
export { default as AwEAbility } from "./ability.mjs"
|
||||
export { default as AwEField } from "./field.mjs"
|
||||
export { default as AwESpecialization } from "./specialization.mjs"
|
||||
export { default as AwEArchetype } from "./archetype.mjs"
|
||||
export { default as AwEBackground } from "./background.mjs"
|
||||
export { default as AwEKit } from "./kit.mjs"
|
||||
|
||||
@@ -19,7 +19,6 @@ export default class AwEField extends foundry.abstract.TypeDataModel {
|
||||
blank: true,
|
||||
choices: { "": "—", ...Object.values(SYSTEM.ATTRIBUTES).reduce((o, a) => { o[a.id] = a.label; return o }, {}) }
|
||||
})
|
||||
schema.specializations = new fields.ArrayField(new fields.StringField())
|
||||
schema.knowledgeBonus = new fields.StringField({ initial: "", required: false, nullable: true })
|
||||
|
||||
return schema
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import { SYSTEM } from "../config/system.mjs"
|
||||
|
||||
export default class AwESpecialization extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields
|
||||
const schema = {}
|
||||
|
||||
schema.fieldName = new fields.StringField({
|
||||
required: true,
|
||||
nullable: false,
|
||||
initial: "",
|
||||
blank: true
|
||||
})
|
||||
|
||||
schema.keyAttributeOverride = new fields.StringField({
|
||||
required: false,
|
||||
nullable: true,
|
||||
initial: "",
|
||||
blank: true,
|
||||
choices: {
|
||||
"": "—",
|
||||
...Object.fromEntries(Object.values(SYSTEM.ATTRIBUTES).map(a => [a.id, a.label]))
|
||||
}
|
||||
})
|
||||
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
schema.traits = new fields.ArrayField(new fields.StringField())
|
||||
|
||||
return schema
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user