diff --git a/module/data/item/domainCard.mjs b/module/data/item/domainCard.mjs index b9855123..327dafce 100644 --- a/module/data/item/domainCard.mjs +++ b/module/data/item/domainCard.mjs @@ -65,17 +65,6 @@ export default class DHDomainCard extends BaseDataItem { return matchingDomainCards < this.parent.system.domainTouched; } - get cannotUse() { - if (this.isDomainTouchedSuppressed) { - return ui.notifications.warn( - game.i18n.format('DAGGERHEART.UI.Notifications.domainTouchRequirement', { - nr: this.domainTouched, - domain: game.i18n.localize(CONFIG.DH.DOMAIN.allDomains()[this.domain].label) - }) - ); - } - } - /* -------------------------------------------- */ /**@override */ diff --git a/module/documents/item.mjs b/module/documents/item.mjs index 8fbe2929..7607658c 100644 --- a/module/documents/item.mjs +++ b/module/documents/item.mjs @@ -146,7 +146,15 @@ export default class DHItem extends foundry.documents.Item { /* -------------------------------------------- */ async use(event) { - if (this.system.cannotUse) return; + /* DomainCard check. Can be expanded or made neater */ + if (this.system.isDomainTouchedSuppressed) { + return ui.notifications.warn( + game.i18n.format('DAGGERHEART.UI.Notifications.domainTouchRequirement', { + nr: this.domainTouched, + domain: game.i18n.localize(CONFIG.DH.DOMAIN.allDomains()[this.domain].label) + }) + ); + } const actions = new Set(this.system.actionsList); if (actions?.size) {