Merged with main

This commit is contained in:
WBHarry 2025-07-25 01:14:41 +02:00
commit f0a809266d
70 changed files with 1245 additions and 881 deletions

View file

@ -9,6 +9,7 @@
*/
import { addLinkedItemsDiff, updateLinkedItemApps } from '../../helpers/utils.mjs';
import { ActionsField } from '../fields/actionField.mjs';
const fields = foundry.data.fields;
@ -23,7 +24,8 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
hasDescription: false,
hasResource: false,
isQuantifiable: false,
isInventoryItem: false
isInventoryItem: false,
hasActions: false
};
}
@ -71,6 +73,8 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
if (this.metadata.isQuantifiable)
schema.quantity = new fields.NumberField({ integer: true, initial: 1, min: 0, required: true });
if (this.metadata.hasActions) schema.actions = new ActionsField();
return schema;
}