Import initial du système

This commit is contained in:
2026-03-28 08:44:19 +01:00
parent 068fca00e5
commit f7a01900ac
105 changed files with 7362 additions and 2090 deletions

19
src/data/items/armor.js Normal file
View File

@@ -0,0 +1,19 @@
export default class ArmorDataModel extends foundry.abstract.TypeDataModel {
static defineSchema() {
const { fields } = foundry.data
const stringField = (initial = "") => new fields.StringField({ required: true, nullable: false, initial })
const htmlField = (initial = "") => new fields.HTMLField({ required: true, nullable: false, initial, textSearch: true })
const intField = (initial = 0, opts = {}) => new fields.NumberField({ required: true, nullable: false, integer: true, initial, ...opts })
return {
reference: stringField(""),
description: htmlField(""),
protectionValue: intField(0),
domain: stringField(""),
obtainLevel: intField(0, { min: 0, max: 5 }),
obtainDifficulty: intField(0, { min: 0, max: 3 }),
quantity: intField(1),
notes: htmlField(""),
}
}
}