diff --git a/README.md b/README.md index c40a27a3..fda78b4b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This is the community repo for the Foundry VTT system _Foundryborne_ Daggerheart ## User Install -1. **recommended** Searching for _Daggerheart_ or _Foundryborne_ in the System Instalaltion dialgoe of the FoundryVTT admin settings. +1. **Recommended** Searching for _Daggerheart_ or _Foundryborne_ in the System Installation dialogue of the FoundryVTT admin settings. 2. Pasting `https://raw.githubusercontent.com/Foundryborne/daggerheart/refs/heads/main/system.json` into the Install System dialog on the Setup menu of the application. 3. Downloading one of the .zip archives from the Releases page and extracting it into your foundry Data folder, under Data/systems/daggerheart. diff --git a/module/applications/characterCreation/characterCreation.mjs b/module/applications/characterCreation/characterCreation.mjs index d45fe54e..c160b2fd 100644 --- a/module/applications/characterCreation/characterCreation.mjs +++ b/module/applications/characterCreation/characterCreation.mjs @@ -359,6 +359,11 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl context.community = { ...this.setup.community, compendium: 'communities' }; context.class = { ...this.setup.class, compendium: 'classes' }; context.subclass = { ...this.setup.subclass, compendium: 'subclasses' }; + + const allDomainData = CONFIG.DH.DOMAIN.allDomains(); + context.classDomains = context.class.uuid + ? context.class.system.domains.map(key => game.i18n.localize(allDomainData[key].label)) + : []; context.domainCards = Object.keys(this.setup.domainCards).reduce((acc, x) => { acc[x] = { ...this.setup.domainCards[x], compendium: 'domains' }; return acc; diff --git a/module/data/item/class.mjs b/module/data/item/class.mjs index 45e8b4ab..cee17613 100644 --- a/module/data/item/class.mjs +++ b/module/data/item/class.mjs @@ -60,6 +60,17 @@ export default class DHClass extends BaseDataItem { /* -------------------------------------------- */ + get domainData() { + const allDomainData = CONFIG.DH.DOMAIN.allDomains(); + return this.domains.map(key => { + const domain = allDomainData[key]; + return { + ...domain, + label: game.i18n.localize(domain.label) + }; + }); + } + get hopeFeatures() { return this.features.filter(x => x.type === CONFIG.DH.ITEM.featureSubTypes.hope).map(x => x.item); } diff --git a/module/data/item/domainCard.mjs b/module/data/item/domainCard.mjs index 34754a41..7705adb1 100644 --- a/module/data/item/domainCard.mjs +++ b/module/data/item/domainCard.mjs @@ -33,6 +33,11 @@ export default class DHDomainCard extends BaseDataItem { }; } + get domainLabel() { + const allDomainData = CONFIG.DH.DOMAIN.allDomains(); + return game.i18n.localize(allDomainData[this.domain].label); + } + /* -------------------------------------------- */ /**@override */ @@ -71,7 +76,7 @@ export default class DHDomainCard extends BaseDataItem { _getTags() { const tags = [ game.i18n.localize(`DAGGERHEART.CONFIG.DomainCardTypes.${this.type}`), - game.i18n.localize(`DAGGERHEART.GENERAL.Domain.${this.domain}.label`), + this.domainLabel, `${game.i18n.localize('DAGGERHEART.ITEMS.DomainCard.recallCost')}: ${this.recallCost}` ]; @@ -85,7 +90,7 @@ export default class DHDomainCard extends BaseDataItem { _getLabels() { const labels = [ game.i18n.localize(`DAGGERHEART.CONFIG.DomainCardTypes.${this.type}`), - game.i18n.localize(`DAGGERHEART.GENERAL.Domain.${this.domain}.label`), + this.domainLabel, { value: `${this.recallCost}`, //converts the number to a string icons: ['fa-bolt'] diff --git a/styles/less/sheets/actors/character/header.less b/styles/less/sheets/actors/character/header.less index 5de7a827..7bfcc7c9 100644 --- a/styles/less/sheets/actors/character/header.less +++ b/styles/less/sheets/actors/character/header.less @@ -10,7 +10,7 @@ } .character-row .domains-section img { - filter: invert(88%) sepia(98%) saturate(1784%) hue-rotate(311deg) brightness(104%) contrast(91%); + filter: @golden-filter; } } }, { @@ -20,7 +20,7 @@ } .character-row .domains-section img { - filter: invert(87%) sepia(15%) saturate(343%) hue-rotate(333deg) brightness(110%) contrast(87%); + filter: brightness(0) saturate(100%); } } }); diff --git a/templates/characterCreation/setupTabs/domainCards.hbs b/templates/characterCreation/setupTabs/domainCards.hbs index 298d8859..66526689 100644 --- a/templates/characterCreation/setupTabs/domainCards.hbs +++ b/templates/characterCreation/setupTabs/domainCards.hbs @@ -10,9 +10,7 @@ {{#each domainCards as |domainCard id|}}
{{#> "systems/daggerheart/templates/components/card-preview.hbs" domainCard }} - {{#each @root.class.system.domains }} -
{{localize (concat "DAGGERHEART.GENERAL.Domain." this ".label")}}
- {{/each}} + {{#each @root.classDomains }}
{{this}}
{{/each}} {{/"systems/daggerheart/templates/components/card-preview.hbs"}}
{{/each}} diff --git a/templates/sheets/actors/character/header.hbs b/templates/sheets/actors/character/header.hbs index b6f51bcf..7f598f55 100644 --- a/templates/sheets/actors/character/header.hbs +++ b/templates/sheets/actors/character/header.hbs @@ -87,9 +87,9 @@ {{#if document.system.class.value}}
- {{#each document.system.class.value.system.domains as |domain|}} + {{#each document.system.class.value.system.domainData as |data|}}
- +
{{/each}}