Other two fixes

This commit is contained in:
WBHarry 2026-03-05 23:50:28 +01:00
parent aff9d42a99
commit fb61eee440
2 changed files with 6 additions and 1 deletions

View file

@ -187,6 +187,7 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
}); });
} }
game.settings.set(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew, this.settings.toObject());
this.render(); this.render();
} }
@ -227,6 +228,7 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
} }
}); });
game.settings.set(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew, this.settings.toObject());
this.render(); this.render();
} }

View file

@ -76,6 +76,9 @@ export default class SettingFeatureConfig extends HandlebarsApplicationMixin(App
static async updateData(event, element, formData) { static async updateData(event, element, formData) {
const data = foundry.utils.expandObject(formData.object); const data = foundry.utils.expandObject(formData.object);
foundry.utils.mergeObject(this.move, data); foundry.utils.mergeObject(this.move, data);
await this.settings.updateSource({
[`${this.movePath}`]: this.move
});
this.render(); this.render();
} }
@ -213,7 +216,7 @@ export default class SettingFeatureConfig extends HandlebarsApplicationMixin(App
this.render(); this.render();
} }
static async addEffect(_, target) { static async addEffect() {
const currentEffects = foundry.utils.getProperty(this.settings, `${this.movePath}.effects`); const currentEffects = foundry.utils.getProperty(this.settings, `${this.movePath}.effects`);
await this.settings.updateSource({ await this.settings.updateSource({
[`${this.movePath}.effects`]: [ [`${this.movePath}.effects`]: [