mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Merge branch 'main' into feature/106-items-browser
This commit is contained in:
commit
e5f0ac7d30
41 changed files with 888 additions and 209 deletions
|
|
@ -1,6 +1,5 @@
|
|||
import LevelUpBase from './levelup.mjs';
|
||||
import { DhLevelup } from '../../data/levelup.mjs';
|
||||
import { domains } from '../../config/domainConfig.mjs';
|
||||
import { abilities, subclassFeatureLabels } from '../../config/actorConfig.mjs';
|
||||
|
||||
export default class DhCharacterLevelUp extends LevelUpBase {
|
||||
|
|
@ -113,7 +112,7 @@ export default class DhCharacterLevelUp extends LevelUpBase {
|
|||
: levelBase;
|
||||
|
||||
return game.i18n.format('DAGGERHEART.APPLICATIONS.Levelup.selections.emptyDomainCardHint', {
|
||||
domain: game.i18n.localize(domains[domain.domain].label),
|
||||
domain: game.i18n.localize(CONFIG.DH.DOMAIN.allDomains()[domain.domain].label),
|
||||
level: levelMax
|
||||
});
|
||||
}),
|
||||
|
|
@ -170,7 +169,7 @@ export default class DhCharacterLevelUp extends LevelUpBase {
|
|||
uuid: multiclass.uuid,
|
||||
domains:
|
||||
multiclass?.system?.domains.map(key => {
|
||||
const domain = domains[key];
|
||||
const domain = CONFIG.DH.DOMAIN.allDomains()[key];
|
||||
const alreadySelected = this.actor.system.class.value.system.domains.includes(key);
|
||||
|
||||
return {
|
||||
|
|
@ -315,7 +314,10 @@ export default class DhCharacterLevelUp extends LevelUpBase {
|
|||
? {
|
||||
...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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { abilities, subclassFeatureLabels } from '../../config/actorConfig.mjs';
|
||||
import { domains } from '../../config/domainConfig.mjs';
|
||||
import { getDeleteKeys, tagifyElement } from '../../helpers/utils.mjs';
|
||||
import { ItemBrowser } from '../ui/itemBrowser.mjs';
|
||||
|
||||
|
|
@ -23,10 +22,11 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
|
||||
static DEFAULT_OPTIONS = {
|
||||
tag: 'form',
|
||||
classes: ['daggerheart', 'levelup'],
|
||||
classes: ['daggerheart', 'dialog', 'dh-style', 'levelup'],
|
||||
position: { width: 1000, height: 'auto' },
|
||||
window: {
|
||||
resizable: true
|
||||
resizable: true,
|
||||
icon: 'fa-solid fa-arrow-turn-up'
|
||||
},
|
||||
actions: {
|
||||
save: this.save,
|
||||
|
|
@ -48,7 +48,10 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
static PARTS = {
|
||||
tabs: { template: 'systems/daggerheart/templates/levelup/tabs/tab-navigation.hbs' },
|
||||
advancements: { template: 'systems/daggerheart/templates/levelup/tabs/advancements.hbs' },
|
||||
selections: { template: 'systems/daggerheart/templates/levelup/tabs/selections.hbs' },
|
||||
selections: {
|
||||
template: 'systems/daggerheart/templates/levelup/tabs/selections.hbs',
|
||||
scrollable: ['.selections']
|
||||
},
|
||||
summary: { template: 'systems/daggerheart/templates/levelup/tabs/summary.hbs' },
|
||||
footer: { template: 'systems/daggerheart/templates/levelup/tabs/footer.hbs' }
|
||||
};
|
||||
|
|
@ -252,7 +255,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
|
||||
}
|
||||
|
|
@ -356,10 +362,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)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue