Resource/Uses max as FormulaField

This commit is contained in:
Dapoolp 2025-07-29 18:38:31 +02:00
parent 18aed3a9f0
commit a15028594d
13 changed files with 86 additions and 48 deletions

View file

@ -133,8 +133,8 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
const resource = this.action.parent.resource;
if (resource) {
options[this.action.parent.parent.id] = {
label: this.action.parent.parent.name,
group: 'TYPES.Actor.character'
label: "DAGGERHEART.GENERAL.itemResource",
group: 'Global'
};
}

View file

@ -260,7 +260,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
icon: 'fa-solid fa-arrow-up',
condition: target => {
const doc = getDocFromElementSync(target);
return doc && system.inVault;
return doc && doc.system.inVault;
},
callback: async target => {
const doc = await getDocFromElement(target);