daggerheart/module/data/item/consumable.mjs
WBHarry c15d55a505
120 - Countdowns (#158)
* Added the shell of the Countdown application

* Added countdown automation

* Fixed overflow layout and added confirmation on countdown removal

* Added ownership to countdowns
2025-06-21 21:37:22 +02:00

24 lines
723 B
JavaScript

import BaseDataItem from './base.mjs';
import ActionField from '../fields/actionField.mjs';
export default class DHConsumable extends BaseDataItem {
/** @inheritDoc */
static get metadata() {
return foundry.utils.mergeObject(super.metadata, {
label: 'TYPES.Item.consumable',
type: 'consumable',
hasDescription: true,
isQuantifiable: true
});
}
/** @inheritDoc */
static defineSchema() {
const fields = foundry.data.fields;
return {
...super.defineSchema(),
consumeOnUse: new fields.BooleanField({ initial: false }),
actions: new fields.ArrayField(new ActionField())
};
}
}