This commit is contained in:
WBHarry 2026-01-11 11:58:35 +01:00 committed by GitHub
commit c7dba71a79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 123 additions and 50 deletions

View file

@ -20,7 +20,10 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
}
if (this.parent?.type === 'domainCard') {
return this.parent.system.inVault;
const vaultSupressed = this.parent.system.vaultSupressed;
const domainTouchedSupressed = this.parent.system.domainTouchedSuppressed;
return vaultSupressed || domainTouchedSupressed;
}
return super.isSuppressed;

View file

@ -31,7 +31,7 @@ export default class DHItem extends foundry.documents.Item {
static async createDocuments(sources, operation) {
// Ensure that items being created are valid to the actor its being added to
const actor = operation.parent;
sources = actor?.system?.isItemValid ? sources.filter((s) => actor.system.isItemValid(s)) : sources;
sources = actor?.system?.isItemValid ? sources.filter(s => actor.system.isItemValid(s)) : sources;
return super.createDocuments(sources, operation);
}
@ -146,6 +146,8 @@ export default class DHItem extends foundry.documents.Item {
/* -------------------------------------------- */
async use(event) {
if (this.system.cannotUse) return;
const actions = new Set(this.system.actionsList);
if (actions?.size) {
let action = actions.first();