Merge branch 'main' into feature/106-items-browser

This commit is contained in:
Dapoolp 2025-08-06 16:30:58 +02:00
commit e5f0ac7d30
41 changed files with 888 additions and 209 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';
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)
);
}