mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 16:09:03 +01:00
Fix conflict
This commit is contained in:
commit
181f848c4e
216 changed files with 13028 additions and 658 deletions
|
|
@ -123,13 +123,15 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat
|
|||
);
|
||||
|
||||
const compendiumBeastforms = await game.packs.get(`daggerheart.beastforms`)?.getDocuments();
|
||||
const beastformTiers = [...(compendiumBeastforms ? compendiumBeastforms : []), ...game.items].reduce(
|
||||
const beastformTiers = [...game.items, ...(compendiumBeastforms ? compendiumBeastforms : [])].reduce(
|
||||
(acc, x) => {
|
||||
const tier = CONFIG.DH.GENERAL.tiers[x.system.tier];
|
||||
if (x.type !== 'beastform' || tier.id > this.configData.tierLimit) return acc;
|
||||
|
||||
if (!acc[tier.id]) acc[tier.id] = { label: game.i18n.localize(tier.label), values: {} };
|
||||
|
||||
if (Object.values(acc[tier.id].values).find(existing => existing.value.name === x.name)) return acc;
|
||||
|
||||
acc[tier.id].values[x.uuid] = {
|
||||
selected: this.selected?.uuid == x.uuid,
|
||||
value: x,
|
||||
|
|
|
|||
|
|
@ -91,9 +91,10 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
|||
context.roll = this.roll;
|
||||
context.rollType = this.roll?.constructor.name;
|
||||
context.rallyDie = this.roll.rallyChoices;
|
||||
context.experiences = Object.keys(this.config.data.experiences).map(id => ({
|
||||
const experiences = this.config.data?.experiences || {};
|
||||
context.experiences = Object.keys(experiences).map(id => ({
|
||||
id,
|
||||
...this.config.data.experiences[id]
|
||||
...experiences[id]
|
||||
}));
|
||||
context.selectedExperiences = this.config.experiences;
|
||||
context.advantage = this.config.roll?.advantage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue