mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 05:01:08 +01:00
Added support for adversary actor sizes
This commit is contained in:
parent
9b4249b100
commit
d38b924cad
15 changed files with 180 additions and 5 deletions
|
|
@ -44,6 +44,7 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
|
|||
deleteAdversaryType: this.deleteAdversaryType,
|
||||
selectAdversaryType: this.selectAdversaryType,
|
||||
save: this.save,
|
||||
resetTokenSizes: this.resetTokenSizes,
|
||||
reset: this.reset
|
||||
},
|
||||
form: { handler: this.updateData, submitOnChange: true }
|
||||
|
|
@ -424,6 +425,17 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
|
|||
this.close();
|
||||
}
|
||||
|
||||
static async resetTokenSizes() {
|
||||
await this.settings.updateSource({
|
||||
tokenSizes: Object.values(this.settings.schema.fields.tokenSizes.fields).reduce(
|
||||
(acc, field) => ({ ...acc, [field.name]: field.initial }),
|
||||
{}
|
||||
)
|
||||
});
|
||||
|
||||
this.render();
|
||||
}
|
||||
|
||||
static async reset() {
|
||||
const confirmed = await foundry.applications.api.DialogV2.confirm({
|
||||
window: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue