Fix clients fear update

This commit is contained in:
Dapoulp 2025-06-01 22:40:14 +02:00
parent 5e97e4a8b8
commit 70a29dafd9
2 changed files with 4 additions and 2 deletions

View file

@ -105,6 +105,5 @@ export default class Resources extends HandlebarsApplicationMixin(ApplicationV2)
if(!game.user.isGM) return;
value = Math.max(0, Math.min(this.maxFear, value));
await game.settings.set(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.Resources.Fear, value);
await this.render(true);
}
}

View file

@ -179,7 +179,10 @@ export const registerDHSettings = () => {
scope: 'world',
config: false,
type: Number,
default: 0
default: 0,
onChange: () => {
if(ui.resources) ui.resources.render({force: true});
}
});
game.settings.register(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.Resources.MaxFear, {