[Feature] Homebrew Domains (#639)

* Split into tabs

* Finished homebrew settings

* .

* Improved domainremoval cleanup
This commit is contained in:
WBHarry 2025-08-06 13:58:17 +02:00 committed by GitHub
parent d186c62ee5
commit 02958f9574
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 560 additions and 49 deletions

View file

@ -1,5 +1,4 @@
import { abilities, subclassFeatureLabels } from '../../config/actorConfig.mjs';
import { domains } from '../../config/domainConfig.mjs';
import { getDeleteKeys, tagifyElement } from '../../helpers/utils.mjs';
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
@ -253,7 +252,10 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
? {
...multiclassItem.toObject(),
domain: checkbox.secondaryData.domain
? game.i18n.localize(domains[checkbox.secondaryData.domain].label)
? game.i18n.localize(
CONFIG.DH.DOMAIN.allDomains()[checkbox.secondaryData.domain]
.label
)
: null,
subclass: subclass ? subclass.name : null
}
@ -357,10 +359,10 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
experienceIncreaseTagify,
Object.keys(this.actor.system.experiences).reduce((acc, id) => {
const experience = this.actor.system.experiences[id];
acc[id] = { label: experience.name };
acc.push({ id: id, label: experience.name });
return acc;
}, {}),
}, []),
this.tagifyUpdate('experience').bind(this)
);
}