First row of tests and fixes

This commit is contained in:
2026-03-05 22:50:53 +01:00
parent 12458925a1
commit f28df2ae76
23 changed files with 442 additions and 126 deletions
+4 -3
View File
@@ -10,13 +10,14 @@ export default class AwEField extends foundry.abstract.TypeDataModel {
required: true,
nullable: false,
initial: "agility",
choices: Object.keys(SYSTEM.ATTRIBUTES)
choices: Object.fromEntries(Object.values(SYSTEM.ATTRIBUTES).map(a => [a.id, a.label]))
})
schema.keyAttribute2 = new fields.StringField({
required: false,
nullable: true,
initial: null,
choices: [...Object.keys(SYSTEM.ATTRIBUTES), null]
initial: "",
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 })