[Feature] Advanced Effect Settings (#1523)

* Added VaultActive and LoadoutIgnore

* Added DomainTouched support

* Naming change

* .

* Improved labels
This commit is contained in:
WBHarry 2026-01-13 10:32:16 +01:00 committed by GitHub
parent 27b7758f7d
commit d823501d91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 102 additions and 41 deletions

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,16 @@ export default class DHItem extends foundry.documents.Item {
/* -------------------------------------------- */
async use(event) {
/* 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) {
let action = actions.first();