Nouvelles corrections sur la fiche

This commit is contained in:
2026-03-06 13:34:18 +01:00
parent b9db8eb2fc
commit 4f15f0cc4c
15 changed files with 204 additions and 55 deletions
+31
View File
@@ -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
}
}