[Fix] Levelup New Experience Increase (#1461)

* Fixed so you can select a newly gained experience to increase

* .

* Exchanged forEach with for..of. The future is now
This commit is contained in:
WBHarry 2025-12-24 01:00:24 +01:00 committed by GitHub
parent f184db1f93
commit 0806c2d1ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 32 additions and 12 deletions

View file

@ -104,7 +104,7 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
context.roll = this.roll;
context.rollType = this.roll?.constructor.name;
context.rallyDie = this.roll.rallyChoices;
const experiences = this.config.data?.experiences || {};
const experiences = this.config.data?.system.experiences || {};
context.experiences = Object.keys(experiences).map(id => ({
id,
...experiences[id]
@ -185,7 +185,7 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
extKey: button.dataset.key,
key: this.config?.data?.parent?.isNPC ? 'fear' : 'hope',
value: 1,
name: this.config.data?.experiences?.[button.dataset.key]?.name
name: this.config.data?.system.experiences?.[button.dataset.key]?.name
}
];
this.render();