mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[Bug] Downtime Actions Fixes (#421)
* . * Added a temp fix for a bug in action healing section * Corrected rules.attack.roll.trait * .
This commit is contained in:
parent
e6bfe08d83
commit
a54f4e3831
8 changed files with 71 additions and 10 deletions
|
|
@ -136,10 +136,14 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
|
|||
...move,
|
||||
name: game.i18n.localize(move.name),
|
||||
description: game.i18n.localize(move.description),
|
||||
actions: move.actions.map(action => ({
|
||||
...action,
|
||||
name: game.i18n.localize(action.name)
|
||||
}))
|
||||
actions: move.actions.reduce((acc, key) => {
|
||||
const action = move.actions[key];
|
||||
acc[key] = {
|
||||
...action,
|
||||
name: game.i18n.localize(action.name)
|
||||
};
|
||||
return acc;
|
||||
}, {})
|
||||
};
|
||||
|
||||
return acc;
|
||||
|
|
@ -165,8 +169,18 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
|
|||
}
|
||||
|
||||
static async reset() {
|
||||
const confirmed = await foundry.applications.api.DialogV2.confirm({
|
||||
window: {
|
||||
title: game.i18n.format('DAGGERHEART.SETTINGS.ResetSettings.resetConfirmationTitle')
|
||||
},
|
||||
content: game.i18n.format('DAGGERHEART.SETTINGS.ResetSettings.resetConfirmationText', {
|
||||
settings: game.i18n.localize('DAGGERHEART.SETTINGS.Menu.homebrew.name')
|
||||
})
|
||||
});
|
||||
if (!confirmed) return;
|
||||
|
||||
const resetSettings = new DhHomebrew();
|
||||
let localizedSettings = this.localizeObject(resetSettings);
|
||||
let localizedSettings = this.localizeObject(resetSettings.toObject());
|
||||
this.settings.updateSource(localizedSettings);
|
||||
this.render();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue