This commit is contained in:
WBHarry 2025-07-11 22:49:03 +02:00
parent b6195127fe
commit 0c742eb91b
5 changed files with 200 additions and 131 deletions

View file

@ -29,7 +29,18 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
/** @inheritDoc */
static defineSchema() {
const schema = {};
const schema = {
uses: new fields.SchemaField({
value: new fields.NumberField({ nullable: true, initial: null }),
max: new fields.NumberField({ nullable: true, initial: null }),
icon: new fields.StringField({ initial: 'fa-solid fa-hashtag' }),
recovery: new fields.StringField({
choices: CONFIG.DH.GENERAL.refreshTypes,
initial: null,
nullable: true
})
})
};
if (this.metadata.hasDescription) schema.description = new fields.HTMLField({ required: true, nullable: true });