Update armor slot handling

This commit is contained in:
Dapoolp 2025-09-02 14:26:50 +02:00
parent 4bdafeff6d
commit af3a415e56
10 changed files with 56 additions and 72 deletions

View file

@ -187,14 +187,6 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
if (allowed === false) return false;
addLinkedItemsDiff(changed.system?.features, this.features, options);
const autoSettings = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Automation);
const armorChanged =
changed.system?.marks?.value !== undefined && changed.system.marks.value !== this.marks.value;
if (armorChanged && autoSettings.resourceScrollTexts && this.parent.parent?.type === 'character') {
const armorData = getScrollTextData(this.parent.parent.system.resources, changed.system.marks, 'armor');
options.scrollingTextData = [armorData];
}
}
_onUpdate(changed, options, userId) {